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.
Hello i am trying to display the prior month totals as a measure in a table where i am showing the totals by month and year... but my measure formula isn't working not sure why? Here is the formula:
Prior days = CALCULATE(SUM('Calendar'[Work Day]),PARALLELPERIOD('Calendar'[Date].[Date],-1,MONTH))
As you can see in the table below i want the 24 for january to show up in february and so on... but the formula above only returns that months totals...
Solved! Go to Solution.
HI @tahir9
Please try this calculated measure
Prior days = CALCULATE( SUM('Calendar'[Work Day]), ALL('Calendar'), PREVIOUSMONTH('Calendar'[Date]) )
HI @tahir9
Please try this calculated measure
Prior days = CALCULATE( SUM('Calendar'[Work Day]), ALL('Calendar'), PREVIOUSMONTH('Calendar'[Date]) )
that worked Phil! Thank you! Just curious if you could explain why that worked but my method did not... ?
HI @tahir9
The magic function in my calculation is the ALL function. This allows me to remove the implicit filtering being applied to the underlying dataset and have access to different rows. If you do some internet searching for DAX Filter Context, there will be a bunch of articles or blogs that describe it. I have a section in my book (aka.ms/practicalDAX) that you may also find useful.
Thanks Phil will check out your book as well as these other resources!
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 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |