Forum Discussion

cosminc's avatar
cosminc
Icon for Post Partisan rankPost Partisan
7 years ago
Solved

Measure with if with filtered value

Hi, I try to create a measure based on a filter value and an if something like this: if(source(salesmen) slicer="George",4, if(source(salesmen) slicer ="Mary",0)) can you help me please with the ...
  • Stachu's avatar
    7 years ago

    you need SELECTEDVALUE, I'd also consider wheter you want to use BLANK - calculation wise it acts as 0, display wise it acts as null

    IF(
        SELECTEDVALUE(Source[Salesman]) = "George",
        4,
        IF(
            SELECTEDVALUE(Source[Salesman]) = "Mary",
            0,
            BLANK()
        )
    )