Forum Discussion

LinhNguyen's avatar
LinhNguyen
Helper II
6 years ago

Measure value based on selection

Hi everyone,

 

I'm trying to create a dynamic filter value based on slicer selection. 

 

In table 'Bonus Selection', I only have 1 column with "Yes" and "No" as value. I created a single selection slicer with that column.

Then, in another table, I wanted to create a measure based on the selection on the previous table. I have tried:

Cost Element Filter =
VAR _includeBonus = SELECTEDVALUE('Bonus Selection'[Include Bonus ?])
RETURN IF(_includeBonus = "No", "610030", "000000")
 
It didn't show any error but there was not any value returned. Did I do something wrong?

4 Replies

  • Hi,

     

    Give more details what you are trying to do.

     

    Why are you creating this measure? Isn't pososible to create a column in the 'Bonus Selection' with this values?

     

    If this helps, I apreciate you give a kudo and mark as the solution. Thanks

    • LinhNguyen's avatar
      LinhNguyen
      Helper II

      I want to get that measure so that I can do a filter based on the viewer's choice. When the users choose "No", I want to filter out one particular cost element ID, which is the value returned in the formula earlier. I can place a filter on the whole page, lock and hide it so that no one can see.

      With that said, creating the same measure in the Bonus selection table might help too. However it's a blank value even when I create that measure in the Bonus Selection table.

       

      • LinhNguyen's avatar
        LinhNguyen
        Helper II

        I tried using calculated column as well but that didn't work either