Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I am struggling the get this working :
Comparing current month / current year versus ALL months / Last year using a slider control.
So if I have 1 Slider for Year and 1 for Month.
And I select JAN 2018 current year. I wand to see ALL 12 months last year.
Ex. CY / Month LY / All months
Jan 100 Jan 80
Feb 120 Feb 75
Mar 110
APR 95
...
DEC 75
So the LY selection needs to be NON CONTEXT related to the current year / month selection.
I tried many options like ; SAMEPERIODLASTYEAR / TOTALYTD / DATESYTD / etc but no success ?
Any help is appreciated...
Solved! Go to Solution.
Hi @ptrex,
If I understand you correctly, you should be able to follow steps below to get the expected result.
1. Use the formula below to create a new measure.
Is Last Year = IF ( YEAR ( MAX ( 'Date'[Date] ) ) = YEAR ( TODAY () ) - 1, 1, 0 )
2. Use the new created measure to apply a visual level filter([Is Last Year] is 1) on the Table visual to show data for full last year.
3. Select the Year Slicer, go to Format tab, and click on Edit interactions.
4. Select None on the Table visual which you use to show data for full last year.
5. Repeat step 3 and 4 for Month Slicer.
Regards
Hi @ptrex,
If I understand you correctly, you should be able to follow steps below to get the expected result.
1. Use the formula below to create a new measure.
Is Last Year = IF ( YEAR ( MAX ( 'Date'[Date] ) ) = YEAR ( TODAY () ) - 1, 1, 0 )
2. Use the new created measure to apply a visual level filter([Is Last Year] is 1) on the Table visual to show data for full last year.
3. Select the Year Slicer, go to Format tab, and click on Edit interactions.
4. Select None on the Table visual which you use to show data for full last year.
5. Repeat step 3 and 4 for Month Slicer.
Regards
It took me a while before I understood the concept of Visual Interactions.
But after watching this video it was clear ...
https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions
After applying you solution to my problem it was spot on 🙂
Thanks a lot
User | Count |
---|---|
93 | |
85 | |
78 | |
68 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |