Forum Discussion
LupinAinsworth
2 years agoFrequent Visitor
Calculation by attribute not included in visual
Hello. I have written the following measure to return certain measures if they are populated/blank. I need to update this measure to calculate specifically on a department level for each condition. C...
amitchandak
Super User
2 years agoLupinAinsworth , As these all are measure you need use a group by with values or more than that with summarize. You can try visual calculations also
Sumx(Values(Dim[Dim COlumn]) ,
SWITCH (
TRUE,
NOT ( ISBLANK ( [Units of Service Actual] ) ) && NOT ( ISBLANK ( [Worked Benchmark Hours] ) ), [Worked Benchmark Hours],
NOT ( ISBLANK ( [Units of Service Actual] ) ) && ISBLANK ( [Worked Benchmark Hours] )
&& NOT ( ISBLANK ( [Units of Service Budget] ) ), [Flexible Budget Hours],
ISBLANK ( [Units of Service Actual] ), [Fixed Budget Hours]
) )
or
Sumx(Summarize(Fact, Dim[Dim COlumn], Dim[Dim COl2]) ,
SWITCH (
TRUE,
NOT ( ISBLANK ( [Units of Service Actual] ) ) && NOT ( ISBLANK ( [Worked Benchmark Hours] ) ), [Worked Benchmark Hours],
NOT ( ISBLANK ( [Units of Service Actual] ) ) && ISBLANK ( [Worked Benchmark Hours] )
&& NOT ( ISBLANK ( [Units of Service Budget] ) ), [Flexible Budget Hours],
ISBLANK ( [Units of Service Actual] ), [Fixed Budget Hours]
) )