Forum Discussion
assign measure value to calculated column
- 9 years ago
Hi Anonymous,
PRobably not as a calculated column but you can do it as a calculated measure and you will probably get the result you are after, in that as you dynamically change the slicer selection your new calcuated meaure will reflect the values
So try putting this measure on your main table and then create a matrix visual
New Measure = 'Input_Threshold'[Measure 5] * [Measure 5]
- Anonymous9 years ago
Hi Anonymous,
>>so calculated column requires, is it possible with calculated measure to do for each indicator?
Current, power bi not support use slicer value to work with calculate column.
You should use measure to instead the calculate column.
Regards,
Xiaoxin SHeng
I realize this is an old post, but the thought of appending a measure to a table as a calculated column signals to me a significant misunderstanding about the difference between calculated columns, measures, and Context in DAX queries.
Calculated Columns operate in the context of the current row i.e. "Row Context". Sure you can play around with CALCULATE, FILTER, etc. but it is a value that pertains to that particular row of data before it has been rolled up / aggregated as a part of a measure.
In order to be actually meaningful, Measures (aggregates of many rows column values) operate against two more contexts in addition to the Row Context; Filter Context and Query Context.
I tend to think of DAX Context like an onion.
Filter Context -> Measures know about this
Query Context -> Measures know about this
Row Context -> Measures and Calculated Columns know about this
If you do add a Measure as a Calculated Column, it will be the SAME for every Calculated column because no Query or Filter Context applies. I do not believe this is what you want.
To solve, as Anonymous pointed out, you will need to create a new Measure that references your old measure in order to accomplish this since you want to still live on that "aggregate" level, not the row.
Here is some reading, I had to read this page 10 times and I'm still not sure I fully understand DAX Contexts.
If you do add a Measure as a Calculated Column, it will be the SAME for every Calculated column because no Query or Filter Context applies. I do not believe this is what you want
Not necessarily. If a relationship exists between the table with the calculated column and another table, then context transition will occur and you'll get a different result for every row
- dani16408 years ago
Advocate II
Yes! In fact! I need it :c
How can make it?