March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Community,
I'm a beginner in Power BI. Need help in 2 measure calculations.
I'm just showing LY and TY comparison. This works fine independently.
But when we put a Year slicer, this doesnot work as expected.
Below, are my measure calculations:
Solved! Go to Solution.
@Dhairya I tried this but it was not working for me.
Meanwhile I have modified the measure to get the required output
add a Year Slicer, make it single select (from date dimension)
add a chart with Month (from date dimension) on x and 2 measure (Total Records , Total Records LY)
Total Records = COUNTROWS('Fact')
Total Records LY = CALCULATE([Total Records], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Have you created a seperate date table named Calendar?
If yes then the above year is for dataytype of that Calendar'date' column,
In PREVIOUSYEAR function you have to pass field having 'date' datatype.
@Dhairya I tried this but it was not working for me.
Meanwhile I have modified the measure to get the required output
add a Year Slicer, make it single select (from date dimension)
add a chart with Month (from date dimension) on x and 2 measure (Total Records , Total Records LY)
Total Records = COUNTROWS('Fact')
Total Records LY = CALCULATE([Total Records], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |