Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

If nested by selecting two values from a column

Good morning I have to make an if on a condition of one month accumulated, that is: * if Dates[Month-Copy Name] has both January and February selected in a filter. I've tried: - SELECTEDVA...
  • johnt75's avatar
    4 years ago

    SELECTEDVALUE only works when there is a single value selected. You could use something like

    test = 
    var chosenMonths = VALUES( 'Date'[Month Name] )
    return IF( COUNTROWS( chosenMonths ) = 2 && "Jan" IN chosenMonths && "Feb" IN chosenMonths, 1, 0 )