Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to show total of a measure for the whole of May 2019 (this time Last year, for the month)
Ive got some DAX for Current Month
Solved! Go to Solution.
I have actually created it in M in power Query Editor
My date in date time. I took Year and Month from it and Merged. E.g. Jan 2020
Then created a New Column of Current Date
I have actually created it in M in power Query Editor
My date in date time. I took Year and Month from it and Merged. E.g. Jan 2020
Then created a New Column of Current Date
@DebbieE , you can use time intelligence with date calendar
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
//or use
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
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/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Appreciate your Kudos.
I undertand what these measures are and I do have a date table connecting to my fact table.
However when I try and use this type of measure I get this
Current Month Flag 12 monthes ago = IF ( YEAR ('Date'[Date].[Date] ) = YEAR ( TODAY () ) - 1 && MONTH ( 'Date'[Date].[Date] ) = MONTH ( TODAY () ), "Yes", "No" )
I have tried this but I just get a blank, even though I know there is no Yes data, even though there is definitely data for that Month
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |