Forum Discussion

thomasreick's avatar
thomasreick
Resolver I
5 years ago
Solved

Using a Card-Visual as a conditoin for LOOKUP from a table

Hi all, From a table I am selecting the MAX(Value) to be shown in a Card-Visual. I would like to use this value to check in a IF-THEN-ELSE-Kind of functionality to return a plain text like 'High', ...
  • selimovd's avatar
    5 years ago

    Hey thomasreick ,

     

    sure, that's possible.

    Try the following:

    MyMeasure =
    VAR vMaxValue = MAX( myTable[Value] )
    VAR vCategory =
        SWITCH(
            TRUE(),
            vMaxValue < 10, "Low",
            vMaxValue < 20, "Medium",
            "High"
        )
    RETURN
        LOOKUPVALUE(
            myResultTable[ResultColumn],
            myResultTable[SearchColumn], vCategory
        )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis