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.
I have two tables:
One table with all measure names in it:
TABLE NAME: MEASURES
Column OBJECT
Column Table
other table with the measur calculation in it
TABLE NAME: ACTUAL
Measure Actual - Gross
Measure Actual -Nett
Now i wanti to create a column as follows
This is working, but I have a lot of measures so this will take me a lot of time to create
The name of the measure is the same as the name in the object
Is there a possbility to make the dax code as follows:
Hi @rjobaan ,
According to your statement, I know your requirement is that you want to auto-match the measure name in "Measure" table with the actual measures by code in format ([Actual measure], table name , [MeasureName]).
As far as I know, there is not any function in Power BI that support us to do this. I think SWITCH() function should be the best way. I think you can update your code as below.
KPI =
SWITCH (
'MEASURES'[OBJECT],
"Actual - Gross", [Actual - Gross],
"Actual - Nett", [Actual - Nett],
"Measure3", [Measure3],
...,
0
)
Add all measures names and all measure into this code.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is already what I have, but i have to many measures..And if measure are deleted or added I need to add again.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
37 | |
30 | |
28 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
36 |