Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Question about VAR Return

Hello everyone,

 

I am confused with this measure. Can anyone please explain?

Add Numeric Distribution111 measure is showing wrong results. it is not filtering any customers.

but Add Numeric Distribution222 is showing right results. Can anyone please explain the reason behind this? I thought these will show same results. 

 

Add Numeric Distribution111 =
VAR __Customers = DISTINCTCOUNTNOBLANK(Answer[CustomerID])
RETURN
CALCULATE(
DIVIDE(
CALCULATE(__Customers, Answer[Actual]=1),
__Customers
)
, CyclePlan[Month]="Current Month"
)

 

Add Numeric Distribution222 =
CALCULATE(
DIVIDE(
CALCULATE(DISTINCTCOUNTNOBLANK(Answer[CustomerID]), Answer[Actual]=1),
DISTINCTCOUNTNOBLANK(Answer[CustomerID])
)
, CyclePlan[Month]="Current Month"
)