Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic comparison with two slicers

Hello !! 

 

A simple question but i can't find answer on the forum. 

I have a table where i have table with in columns : ID, review name and a number. (See below)

Florian1414_0-1713371032187.png


What i wnat to do is a dynamic comparison between reviews. Thus to dothat i want i slicer wich filter all the table + a slicer wich permit me to import the number of the second review selected.

Like that i will have for exemple if i selected review 1 i have all the data of review 1 and in the second slicer if i selected review 3 i import via the mesure just the column which is the number : 

Florian1414_3-1713371501844.png

 

 

and the objective is to compare so if i can import the data of the second slicer in a column, i can do the soustraction. 
the question is : Can i import in a new column via a mesure all the value filtered by the second slicer on power bi ? 

Thanks by advance for your help,

Florian

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous 
You need to create 2 tables with reviews ( 1 for every slicer).
I created them with PQ, duplicated the table, removed unneeded columns and removed duplicates :

Ritaf1983_0-1713409847241.pngRitaf1983_1-1713409903528.pngRitaf1983_2-1713409940254.png

and duplicated again a resulted table because we need 2.

The next step is to create a relationship between those tables and your fact table :

Ritaf1983_3-1713410066162.png

The values of those 2 tables is for the 2 wanted slicers :

Ritaf1983_4-1713410141198.png

The next step is to create 2 measures :

Selction  1 = CALCULATE(sum('Table'[number]),REMOVEFILTERS('Review2'))
Selction 2 = CALCULATE(sum('Table'[number]),REMOVEFILTERS('Review1'))
And to put them in the desired visualization 
Ritaf1983_5-1713410240098.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @Anonymous 
You need to create 2 tables with reviews ( 1 for every slicer).
I created them with PQ, duplicated the table, removed unneeded columns and removed duplicates :

Ritaf1983_0-1713409847241.pngRitaf1983_1-1713409903528.pngRitaf1983_2-1713409940254.png

and duplicated again a resulted table because we need 2.

The next step is to create a relationship between those tables and your fact table :

Ritaf1983_3-1713410066162.png

The values of those 2 tables is for the 2 wanted slicers :

Ritaf1983_4-1713410141198.png

The next step is to create 2 measures :

Selction  1 = CALCULATE(sum('Table'[number]),REMOVEFILTERS('Review2'))
Selction 2 = CALCULATE(sum('Table'[number]),REMOVEFILTERS('Review1'))
And to put them in the desired visualization 
Ritaf1983_5-1713410240098.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

HI there ! 

Super, many thanks for your help ! I didn't think to display all my data with measure which is much more easier ! super !!! 🙂 

 

Have a good day, 

Happy to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.