Forum Discussion
PSRai
6 years agoHelper III
Combine two measures
I currently have 1 column = socket_id and 2 measures = Energy Used in Period1 and Energy Used, I need to create a NEW COLUMN which is a mix of the two measures, Energy Used in Period1 and Energy Use...
- 6 years ago
Sorry I didn't get back to you earlier.
Please try to wrap the measures by a calculate.
New Measure = sumx('Table', if('Table'[Socket_id ] in {550, 639, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 679, 681, 682, 683}, Calculate([EnergyUsedInPeriod1]), Calculate([EnergyUsed])))
helassal
6 years agoResolver II
In that case, try creating it as a measure instead of a column. Can you try it like that:
New Measure =
sumx('Table', if('Table'[Socket_id ] in {550, 639, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 679, 681, 682, 683}, [EnergyUsedInPeriod1], [EnergyUsed]))
PSRai
6 years agoHelper III
Unfortuantely it returns the values of [Energy Used in Period1] but I get 0.0000 on [EnergyUsed].
[Energy Used in Period1], [EnergyUsed]
If I switch the two around [EnergyUsed] and [Energy Used in Period1] then I get 0.000 on the [Energy Used in Period1]
- helassal6 years agoResolver II
Sorry I didn't get back to you earlier.
Please try to wrap the measures by a calculate.
New Measure = sumx('Table', if('Table'[Socket_id ] in {550, 639, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 679, 681, 682, 683}, Calculate([EnergyUsedInPeriod1]), Calculate([EnergyUsed])))