Forum Discussion
Using a Card-Visual as a conditoin for LOOKUP from a table
- 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 regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
Hi all,
thank you very much for your contributions.
I checked all of your proposals. All of them worked out fine so it is hard to decide "the one" accepted.
I favoured Selimovd's solution, because this one matches most my way of thinking.
The fun fact: I possibly made my issue not clear enough. I asked the follwing:
"I would like to use this value to check in a IF-THEN-ELSE-Kind of functionality to return a plain text like 'High', 'Medium', 'Low'."
What I meant was: "I would like to refer to this visual's value to check ..... ".
Reason why: I do VBA-Programming (MS-Access) and sometimes there is the need to refer to a value within a control. I thought there is a similar approach in PBI.
But nevertheless, all your proposals have made my day.
Thank you very much.
Thomas