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 dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Is it possible to convert the following calculated column to measure?
field widget =
var minimum =
LOOKUPVALUE('Virtual Table'[value], 'Virtual Table'[product_id],'Virtual Table'[product_id], 'Virtual Table'[type], "min")
var maximum =
LOOKUPVALUE('Virtual Table'[value], 'Virtual Table'[product_id],'Virtual Table'[product_id], 'Virtual Table'[type], "max")
var diff =
(maximum - minimum)
var mean =
DIVIDE((LOOKUPVALUE('Virtual Table'[value],'Virtual Table'[product_id],'Virtual Table'[product_id],'Virtual Table'[type],"mean")-minimum),diff)
var wavg =
DIVIDE((LOOKUPVALUE('Virtual Table'[value], 'Virtual Table'[product_id],'Virtual Table'[product_id], 'Virtual Table'[type], "wavg")-minimum),diff)
var pp =
DIVIDE((LOOKUPVALUE('Virtual Table'[value], 'Virtual Table'[product_id],'Virtual Table'[product_id], 'Virtual Table'[type], "pp")-minimum),diff)
RETURN
ABS(IF('Virtual Table'[type] = "mean",mean,
IF('Virtual Table'[type] = "wavg",wavg,
IF('Virtual Table'[type] = "min",0,
IF('Virtual Table'[type] = "max",1,
IF('Virtual Table'[type] = "product_price",pp, BLANK()))))))
Solved! Go to Solution.
I think you can reuse this with just a few changes. In each of your LOOKUPVALUE calls, wrap the third parameter in SELECTEDVALUE(), and do the same thing in each of the IF statements - replace 'Virtual Table'[type] with SELECTEDVALUE('Virtual Table'[type])
I think you can reuse this with just a few changes. In each of your LOOKUPVALUE calls, wrap the third parameter in SELECTEDVALUE(), and do the same thing in each of the IF statements - replace 'Virtual Table'[type] with SELECTEDVALUE('Virtual Table'[type])
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 |
---|---|
15 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |