Forum Discussion
MTD Calculation not working properly
I have a date table based on this dax formula.
I've created a visual (table) in which I would like to summarize the MTD Actual Billings by each Business unit.
When I use:
Can someone suggest how I can fix this or to calculate MTD?
Thanks in advance!
Chris
1 Reply
- Ashish_MathurSuper User
Hi,
To create a Date table, just click on New Table under Modelling
Date = calendar(DATE(2016,1,1), DATE(2021,12,31))
Build a relationship from the Date column of your Cost table to the Date column of the Date table.
In the Date table, write calculated column formulas to extract Year, Month name and Month number. Sort the Month name column by the Month number column. Create 2 slicers - one for Year and Month name. Select a Year and a Month name. Write these measures
Total cost = sum('Cost'[JTD Actual Billings])
Total cost MTD = calculate([Total cost],datesmtd('Date'[Date]))
Hope this helps.