Forum Discussion

Nazdac911's avatar
Nazdac911
Helper II
3 years ago
Solved

Using DAX, not calculated columns. Getting another value if text column contains specified value

Hi All  I faced the following challenge From the following virtual table I want to be able to filter through 3 slicers [ City , Store, Category] and then showing the following results: ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Nazdac911 ,

     

    Is it probably similar to this format?(the data I use are different from yours)

    create the following measure:

    PRD = IF('Table'[field]="product 1 high quality","PRD 1",IF('Table'[field]="product 2 high quality","PRD 2","PRD 3"))
    profits = CALCULATE(SUM('Table'[profit]),FILTER(ALL('Table'),'Table'[PRD]=SELECTEDVALUE('Table'[PRD])))

     

    You can also refer to my pbix file for better understanding.

     

    Best regards,

    Community Support Team Selina zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly