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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Slicer Selection as Filter

I have a page in my report with a slicer to select a unique metric and a graph to display information based on the metric chosen. Normally if the graph used the same column values as the slicer this would be done automatically. Unfortunately, I had to duplicate and manipulate the original data table to get the graph to format correctly according to my needs. Therefore although the information is the same, I cannot use the same column of values because it needs to be formatted differently. So I need the selection from the slicer to act as a filter so that the graph only shows information for which the value in its metric column is the same as the selected metric in the slicer. Is there any way I can use the slicer selection as a sort of dynamic filter in this way?

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

Hi, @Anonymous 

According to your description, maybe you can try follow steps:

1 )Create the calculated column as below.

Table 2 = SELECTCOLUMNS('Table',"a1",'Table'[Column2])

2)create measure as below:

Measure = CALCULATE(SUM('Table'[Column1]),FILTER('Table','Table'[Column2]=SELECTEDVALUE('Table 2'[a1])))

 

3)add measure to the table visual to filter the table

Here is a sample I made :

URL: https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EfN98JXI3iVAomB_DONSBCgBbI3Gh5QzWW0TnE2HtGTyDw?e=YLgdCO

Annotation 2020-01-16 165534.png

 

If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best Regards,
Community Support Team _ Eason
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

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, maybe you can try follow steps:

1 )Create the calculated column as below.

Table 2 = SELECTCOLUMNS('Table',"a1",'Table'[Column2])

2)create measure as below:

Measure = CALCULATE(SUM('Table'[Column1]),FILTER('Table','Table'[Column2]=SELECTEDVALUE('Table 2'[a1])))

 

3)add measure to the table visual to filter the table

Here is a sample I made :

URL: https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EfN98JXI3iVAomB_DONSBCgBbI3Gh5QzWW0TnE2HtGTyDw?e=YLgdCO

Annotation 2020-01-16 165534.png

 

If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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