I am having trouble calculate Annualized Return on Assets.
The calculation is Earning/Asset*(Selected Month/12).
The tables I have are Date Table and an Pivoted Financial table shown in the attachment.
What I hope to achieve is having a dax calcualtion where I could select any given month period the
(Selected month) in the bracket will change accordingly.
ROA(KPI) = [AA_400000]/(Selected month)*12/[AA_500000]
I wonder how this could be done in the dax formula? The output will be a percentage figure.
Are you looking to select Month in a Slicer and based on that get the selected Month. If yes, then can try something like below. Here, max(‘Date Table’[MonthOfYear]) is returning the Selected Month from Date table based on period selected in slicer.
ROA(KPI) = var selectedMonth = max('Date Table'[MonthOfYear])
var AA_400000 = Sum('Financial Table'[AA_400000])
var AA_500000 = Sum('Financial Table'[AA_500000])
return
Divide(AA_400000,AA_500000) * Divide(selectedMonth,12)