I have this expression:
TAM Amount = CALCULATE( SUM(CifSales[Amount]); DATESINPERIOD(CalendarTable[DateKey];LASTDATE(CalendarTable[DateKey]);-12;MONTH) )
This, calculate the TAM amount of my sales table (reference date is november 2017). The result its as follows:
With this, I need to obtain the average value of those 12 records. The correct amount is 11,834,775.87
I have tried several forms of Average and none of them works for me. ¿Can you please help me?
Thanks in advance!
Solved! Go to Solution.
You need to use an AveregeX expression add another measure like this:
Average on total = IF ( HASONEVALUE ( Calendar[Years] ); [TAM Amount]; AVERAGEX ( ALL ( 'Calendar'[Year]; Calendar[ShortMonthName] ); [TAM Amount] ) )
Hi @MFelix, thanks for fast reply!
Unfortunately, that formula doesn't fit what I need. This is the result:
The line result is the same, but total doesn't work.
Thanks again for your help!
I need one graphic as follows:
From now, thanks to @mattbrice (its formula works!) I have the right total, but I don't know how can I obtain always those 12 months having a slicer as reference.
Any help would be very appreciated
Don't miss the Power BI Dev Camp this week!
Check out a full recap of the month!
Check out the winners of the recent 'Can You Solve These?' community challenge!
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.