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 hope I will be able to explain my problem in a clear way:
I need to use just one slicer in order to select a year. The problem is that I would like to use this slicer for two different visualizations, one showing the data related to the year selected in the slicer and the other one, showing the same data for the previous year selected. I would like to personalize the second graph so that it shows the selected year minus one.
Is there any way of doing this? any DAX solution? THANK YOU!!!
Hi @Carmen,
Can you mark the proper answer as a solution please?
Best Regards,
Dale
Hi @Carmen,
If you don't want to duplicate your tables, you have to create an independent date table, which means no relationships established to other tables. Then you can create two measure to filter whether the year is the current year or the previous year.
Can you share a sample? The DAX could depend on your data model. The solution could be like below.
measure = IF ( YEAR ( MIN ( 'table'[date] ) ) = MIN ( 'datetable'[year] ), 1, 0 )
Then hide these values "0".
Best Regards,
Dale
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 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |