Forum Discussion
Using Measure as a Column within another Measure
Hi Everyone,
I've got this problem that is very straightforward in Excel, but having trouble in PowerBI. Basically, I have my data, each with a unique RowID (1 - 10,000). I have a couple WhatIf parameters that I would like to apply to Column 1 in the data on a ROW level. Since WhatIf parameters can only be used in measures, I used the following to do this:
Measure 1 = SUMX(Table, Table[Column 1] + [Parameter 1 Value]*[Parameter 2 Value])
I can use this in a matrix with RowID to get the row by row calculation, but this isn't what I'm interested in. I then need to use the PERCENTILE.INC function for a list of percentiles on the column Measure 1. However, since Measure 1 isn't actually a column stored anywhere, I cannot access it from the PERCENTILE.INC function.
Is there any way around this? I was thinking if it is possible to output a table with RowID and Measure 1 which could then be referenced in the PERCENTILE.INC function?
In short: I need to apply WhatIf parameters to a column in the data on a row level, then use the resulting column in a percentile function. The problem is it appears this all needs to be done via measures since calculated columns cannot use WhatIf parameters.
Thank you!!
Wait, I believe I've figured this out. Just using the PERCENTILEX function instead of SUMX appears to give the desired result.
1 Reply
- NeshRFrequent Visitor
Wait, I believe I've figured this out. Just using the PERCENTILEX function instead of SUMX appears to give the desired result.