Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have created two tables:
User can see green field as slicer in sheet and on select, i have created measure in id_indicator table,
Measure 5 = if(COUNTROWS('Input_Threshold') = 1, sum('Input_Threshold'[Green]), BLANK())
I want to assign ([measure 5] * [by_hour]) to field calculated but it is not working, giving black (I tried calculated = [measure 5] but still not working)
Is it possibe to assign measure value to calculated column?
Solved! Go to Solution.
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]
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 @v-shex-msft 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
Yes! In fact! I need it :c
How can make it?
In facts i need it.. is possible use a measur in column calculated?
For example. In a report I have a Parameter but in my column calculated the parameter is factor of a value in other column (the problem is very complicated that it obviously) and don't can use measure.
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]
Hi @Phil_Seamark,
Thanks for replying, yes it is possible to use it as calculate measure,
What is want is for each id_indicator calculated column would be different as value would be different.
if measure 5 is 50. (user select 50 as slicer value)
id_indicator hour calculated column
1 9 50*9
1 10 50*10
.........upto ............20 50*20
2 9 50*9
2 10 50*10
......upto......20.......
..for 1000 id_indicator
so calculated column requires, is it possible with calculated measure to do for each indicator?
Thanks.
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |