I have have a column with quarters and year in the format "2019/Q3".
I want to have 2 different slicers on this column so that i can compare results across these 2 quarters selected.
The hurdle for me is fetch individual values from these 2 slicers. I tried using selectedvalue but it does not work. It would be great if someone can help me here.
e.g if selected value in slicer 1 is "2019/Q3" and selected value in slicer 2 is "2019/Q4", then i need 2 measures with these 2 values as result.
Note: the slicers are based on the same column in a table
Solved! Go to Solution.
Hi @vaibhavdesai ,
You need to create new irrelevant tables as slicers. If use the original column, the results will be always filtering by another slicer.I create a sample that you could have a try.
Year & Quarter = 'Table'[Date].[Year]&"/Q"&'Table'[Date].[QuarterNo]
Q3 = VAR a = SELECTEDVALUE ( '2019/Q3'[2019/Q3] ) VAR b = CALCULATE ( SUM ( 'Table'[ Sales] ), FILTER ( 'Table', 'Table'[Year & Quarter] = a ) ) RETURN IF ( ISFILTERED ( '2019/Q3'[2019/Q3] ), b, BLANK () ) Q4 = VAR a = SELECTEDVALUE ( '2019/Q4'[2019/Q4] ) VAR b = CALCULATE ( SUM ( 'Table'[ Sales] ), FILTER ( 'Table', 'Table'[Year & Quarter] = a ) ) RETURN IF ( ISFILTERED ( '2019/Q4'[2019/Q4] ), b, BLANK () )
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I suggest you to turn on the interaction of the slicers for the desired tables only.
You can see the edit interactions on Format Tab once you clicked the slicer tab
This is a must watch for a message from Power BI!
Click here to read more about the December 2020 Updates!
Click here to read the latest blog and learn more about contributing to the Power BI blog!
Mark your calendars and join us for our next Power BI Dev Camp!.