Forum Discussion

tt211595's avatar
tt211595
Frequent Visitor
2 years ago
Solved

Measure with rowwise IN operator

Hello! I am trying to create a measure that returns TRUE and FALSE for each row of a table based on a slicer selection.   For example, say I have a table called MyTable with two columns named ID an...
  • rajendraongole1's avatar
    2 years ago

    Hi tt211595  - Create a table that contains all unique colors

    uniquecolors = VALUES('MyTable'[Color])

    create a measure and pass your uniquecolors :

    MyMeasure =
    VAR SelectedColors = VALUES('AllColors'[Color])
    RETURN
    IF(
    SELECTEDVALUE('MyTable'[Color]) IN SelectedColors,
    TRUE,
    FALSE
    )

     

    Ensures that the measure MyMeasure evaluates each row of MyTable and returns TRUE if the color is selected in the slicer otherwise FALSE

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!