1
votes

assign measure value to calculated column

I have created two tables:

enter image description hereenter image description here

User can see green field as slicer in sheet and on select, i have created measure in id_indicator table,

Measure will take one value, that user selects from slicer

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?

Below it says measure5 has value 60 enter image description here

But while at assigning column values it takes blank value as 'else' part says.

enter image description here

1

1 Answers

0
votes

Of course it is possible to assign measure to the calculated column. The measure in such a case will be evaluated in row context applicable for every row of this calculated column.

The measure however needs to be accessible. Therefore it must be defined in table to which you are adding calculated column, or defined in the table accessible through a relationship.

Create simple example:

TestMeasure = 7
CalculatedColumn = 7 * id_indicator

Edit (after OP updated question):

Calculated objects (calc tables and calc columns) are not affected by slicers. Calculated objects are static therefore you cannot alter calculated object results through slicers.