Forum Discussion
dp32
6 years agoHelper I
Exception aggregation
Hi, I have a Pivot Table with a P&L account hierarchy. For some of the accounts, I need an exceptional aggregation other than sum. E.g. for the account Depreciation Tangibles, the MTD values should...
amitchandak
6 years agoSuper User
If you have date table you can do like
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] =maxx(date,date[date])))
Or
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] =maxx(date,endofmonth(dateadd(date[date]),-1,month))))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
dp32
6 years agoHelper I
Thanks, but this will not result in an exception aggregation. It will then be applied to all accounts of the P&L hierarchy.