The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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] ) )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
78 | |
76 | |
43 | |
37 |
User | Count |
---|---|
157 | |
114 | |
64 | |
60 | |
55 |