The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi, i need help with this stuff. I have 2 graphics where i need to show the current year in one graphic, and the previus year in the other, but i also have a filter of year. How can i show this?
Solved! Go to Solution.
The easiest way is to apply a filter to the specific visuals.
BTW, the other solutions provided that talk about date tables and measures is really the way I would prefer to handle it, but applying visual filters can be the fastest, but it will only solve the problem for specific visuals and not provide the other advantages the measures will do once you have a real Date table in your model.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHey @Anonymous
This is what you are looking for: https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
Alternatively, you can create another sliver and edit the interations so that one slicer interacts with one visual and the other with the other so that you can show two separate years of your choice according to the two slicers: https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions
I have used both methods depending on the needed final result.
Hey @Anonymous ,
this site contains almost anything one has to know about time intelligence and Power BI or better DAX:
https://www.daxpatterns.com/time-patterns/
It is essential that you create a calendar table, relate the date column of the calendar table to the fact table.
Use the year columns from the calendar table in your visuals, the slicer and the months.
Create a measure that calculates the previous year value and use this measure in the visual that shows the previous year values.
Hope this will help to tackle your challenge.
Regards,
Tom
Hey @Anonymous
This is what you are looking for: https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
Alternatively, you can create another sliver and edit the interations so that one slicer interacts with one visual and the other with the other so that you can show two separate years of your choice according to the two slicers: https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions
I have used both methods depending on the needed final result.
The easiest way is to apply a filter to the specific visuals.
BTW, the other solutions provided that talk about date tables and measures is really the way I would prefer to handle it, but applying visual filters can be the fastest, but it will only solve the problem for specific visuals and not provide the other advantages the measures will do once you have a real Date table in your model.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingUser | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
182 | |
81 | |
64 | |
46 | |
38 |