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.
Hi ,
We have a date slicer which is based on a calendar table. For Example if i enter date 09/01/2017 and till date which is 09/18/2017,I
need to show the measures for previous year end of the month,so it should be sum(measure) for 09/01/2016 and 09/30/2016. It should show for the entire month and not date to date comparison.
Best Regards,
Solved! Go to Solution.
You may refer to the following DAX.
Measure = VAR d = MAX ( 'Calendar'[Date] ) RETURN CALCULATE ( SUM ( Table1[Column1] ), Table1[Date] >= DATE ( YEAR ( d ) - 1, MONTH ( d ), 1 ) && Table1[Date] < DATE ( YEAR ( d ) - 1, MONTH ( d ) + 1, 1 ) )
You may refer to the following DAX.
Measure = VAR d = MAX ( 'Calendar'[Date] ) RETURN CALCULATE ( SUM ( Table1[Column1] ), Table1[Date] >= DATE ( YEAR ( d ) - 1, MONTH ( d ), 1 ) && Table1[Date] < DATE ( YEAR ( d ) - 1, MONTH ( d ) + 1, 1 ) )
Thanks a lot. I tried the formula with minor changes and it worked perfectly.
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 |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |