March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Everyone,
Asking for help and suggestion about comparing same column from same table but filtered differently in visuals using slicers and interaction.
What I did was I created 2 set of slicers and 2 visualization. Using interaction, I set the 1st slicer to interact only with the 1st visual and the same for 2nd slicer to interact only to the 2nd visual. With this, I was able to have separate data from my visuals using slicer even if it is sourcing from same column and table. However, I want to compare the data that was appearing in the visuals. Does anyone here have idea to do it?
For reference:
Column Name | Using Slicer 1 | Using Slicer 2 |
A | 20 | 30 |
Comparison I want | 2nd | 1st |
Solved! Go to Solution.
Hi @robertsarza ,
You need to create another 2 slicer tables first;
Then create a dimension table as below:
Finally create 4 measures as below:
salary1 = IF(ISFILTERED('Slicer 1'[age]),CALCULATE(MAX('Table'[salary]),FILTER('Table','Table'[age]=SELECTEDVALUE('Slicer 1'[age]))),MAX('Table'[salary]))
salary2 = IF(ISFILTERED('Slicer 2'[age]),CALCULATE(MAX('Table'[salary]),FILTER('Table','Table'[age]=SELECTEDVALUE('Slicer 2'[age]))),MAX('Table'[salary]))
Sliced value =
SWITCH(SELECTEDVALUE('Dimension table'[slicers]),
"slicer1",'Slicer 1'[salary1],
"slicer2",'Slicer 2'[salary2],BLANK())
Rankx = RANKX(ALL('Dimension table'),'Dimension table'[Sliced value],,DESC,Dense)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @robertsarza ,
You need to create another 2 slicer tables first;
Then create a dimension table as below:
Finally create 4 measures as below:
salary1 = IF(ISFILTERED('Slicer 1'[age]),CALCULATE(MAX('Table'[salary]),FILTER('Table','Table'[age]=SELECTEDVALUE('Slicer 1'[age]))),MAX('Table'[salary]))
salary2 = IF(ISFILTERED('Slicer 2'[age]),CALCULATE(MAX('Table'[salary]),FILTER('Table','Table'[age]=SELECTEDVALUE('Slicer 2'[age]))),MAX('Table'[salary]))
Sliced value =
SWITCH(SELECTEDVALUE('Dimension table'[slicers]),
"slicer1",'Slicer 1'[salary1],
"slicer2",'Slicer 2'[salary2],BLANK())
Rankx = RANKX(ALL('Dimension table'),'Dimension table'[Sliced value],,DESC,Dense)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |