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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

One slicer controlling 2 graphs as opposites

Hi, 

 

im looking to build matrix graphs (or any, doesnt really mater) where, using slicers, i want to compare one part of a dataset v the whole dataset minus that part. 

(so, dataset is 5 companies, i want to compare results from company A v results from company BCDE, company C v company ABDE etc)

 

Is there a way to use one slicer to select both the company i want to compare and simultaneously mirror that selection onto a second, further identical graph?

 

I know i can just set up one graph to include the full dataset, and use slicers to modify the other, but that means that the overall graph would still include the data for the company i want to check out (basically comparing it with at least part of itself), and i'd rather not do that.

 

Please advise 🙂

Kind regards,

 

Ramon

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario.

Table:

a1.png

 

You can create a calculated table as follows and use its column as the slicer.

a2.png

 

Then you need to create a measurea as below and put it in the corresponding visual level filter.

 

displayvalues = 
var _currentcountry = SELECTEDVALUE('Table 2'[Country])

return 
IF(
     MAX('Table'[Country]) = _currentcountry,
     1,
     0
)

 

 

Result:

a5.png

a6.png

Best Regards

Allan

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@v-alq-msft@VasTg

 

Thanks for the quick and clear answers! 

Kind regards,

 

Ramon

v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario.

Table:

a1.png

 

You can create a calculated table as follows and use its column as the slicer.

a2.png

 

Then you need to create a measurea as below and put it in the corresponding visual level filter.

 

displayvalues = 
var _currentcountry = SELECTEDVALUE('Table 2'[Country])

return 
IF(
     MAX('Table'[Country]) = _currentcountry,
     1,
     0
)

 

 

Result:

a5.png

a6.png

Best Regards

Allan

 

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

VasTg
Memorable Member
Memorable Member

@Anonymous 

 

You have to create two sets of measure. A regular measure includes the selection and another measure that excludes the selection.

 

Refer to these posts.

 

https://community.powerbi.com/t5/Desktop/Exclude-data-based-on-Slicer/m-p/608675

https://community.powerbi.com/t5/Desktop/Exclude-value-via-a-slicer/m-p/467691

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.