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

Be 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

Reply
Anonymous
Not applicable

Connecting a Measure to a Slicer

I have a table with a list of countries (USA, FRANCE, GERMANY, ETC...). Each country has a index value next to it. I use this table to create a slicer on my report.

 

I need a measure that will change the country based upon the input that is chosen in the slicer (e.g. if someone chooses USA, then the measure will update the report to the USA data; if someone chooses France, then the measure will update to France.

 

Is there a way to do this?

 

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

Hi,

 

For your requirement, i create a sample to show:

30.PNG32.PNG31.PNG

If you want to show the total sum sales for the country you select, please try this measure:

Measure = CALCULATE(SUM('Table 2'[Sales]),FILTER('Table 2','Table 2'[Country]=SELECTEDVALUE('Table 1'[Country])))

Choose [Country] from Table 1 as a slicer and this measure as a card visual, when selecting one country in slicer, the result shows:

33.PNG

Here is my test pbix file:

pbix 

Hope this can help.

 

Best Regards,

Giotto Zhi

View solution in original post

2 REPLIES 2
v-gizhi-msft
Community Support
Community Support

Hi,

 

For your requirement, i create a sample to show:

30.PNG32.PNG31.PNG

If you want to show the total sum sales for the country you select, please try this measure:

Measure = CALCULATE(SUM('Table 2'[Sales]),FILTER('Table 2','Table 2'[Country]=SELECTEDVALUE('Table 1'[Country])))

Choose [Country] from Table 1 as a slicer and this measure as a card visual, when selecting one country in slicer, the result shows:

33.PNG

Here is my test pbix file:

pbix 

Hope this can help.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

Yes, it works perfectly! It is an elegant solution.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.