Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Create Slicer from Measure

Hi, I have a measure that has 5 possible results; H, MH, M, ML, and L.

I need a way of using the results of this measure as a slicer for other visuals in my report

 

The measure is as follows

 

Risk Words = if([Risk Score]>=80,"H",if([Risk Score]>=60,"MH",if([Risk Score]>=40,"M",if([Risk Score]>=20,"ML","L"))))

 

Where 'Risk Score' is

 

Risk Score = max('Country Risk'[Money Laundering])*(((((if(isblank(max('Controversy DATA'[Anti-Money Laundering])),50,iferror(max('Controversy DATA'[Anti-Money Laundering]),50))+if(isblank(max('GICS Industry Risk Scores'[Anti-Money Laundering])),50,iferror(max('GICS Industry Risk Scores'[Anti-Money Laundering]),50)))/4)-25)/100)+1)
 
I have tried going down the route of a disconnected table, though I can't figure out how when one value from the table s selected how do I create another measure that filters the other visuals to display only when 'Risk Words' = the selected measure.
 
Any help would be much appreciated!

8 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks so much for your reply Greg, I have been trying to use this post as a guide but to no avail.

       

      I have created a Measure for each of the 5 possibilities as well as the standalone table

       

      e.g. 

      H = if([Risk Score]>=80,"H",BLANK())
      MH = if(and([Risk Score]>=60,[Risk Score]<80),"MH",BLANK())
       
      and then I am trying to use the linking measure
      Disconnected Table Trick = if(HASONEVALUE(RiskNamesAbbr[Risk Levels]),switch(values(RiskNamesAbbr[Risk Levels]),"H",[H],"MH",[MH],"M",[M],"ML",[ML],"L",[L]))
       
      Am I missing something as I still can't get it to work
      • karun_r's avatar
        karun_r
        Microsoft Employee

        Can you share a sample pbix file ? When you use the disconnected table trick as mentioned in Greg's post, it will work only with certain dimensions that you have configured your DAX with. I should be able to help you if I can get some reproducible pbix.