Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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?

  • 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

     

    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.

     

1 Reply

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity 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

     

    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.