Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I have a table in my model that contains parameters (i.e : (key, value)):
The table has 2 columns :
- ParamName : Name of the parameter (string)
- ParamValue : Value of the parameter (may be string, integer, date)
How can I create measure that returns the ParamValue based on a given ParamName ?
I tried that, but it does not work :
Measure =FIRSTNONBLANK(PARAM[ParamValue ];PARAM[ParamName ]="TheNameOfTheParameter")
Thanks
Solved! Go to Solution.
Hi @jct999 -
You can use LOOKUPVALUE for this:
Measure =
var __PN = SELECTEDVALUE(PARAM[ParamName])
RETURN
LOOKUPVALUE ( PARAM[ParamValue], PARAM[ParanName], __PN )
Hope this helps
David
Hi @jct999 -
You can use LOOKUPVALUE for this:
Measure =
var __PN = SELECTEDVALUE(PARAM[ParamName])
RETURN
LOOKUPVALUE ( PARAM[ParamValue], PARAM[ParanName], __PN )
Hope this helps
David
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |