Forum Discussion
Anonymous
4 years agoNot applicable
Measure with IF statement causes cross join
I have a table visual. I've created a simple measure: Total_participants=CALCULATE(MAX('FactTable'[NB_PARTICIPANTS])) When adding this measure to the visual, the number of rows is correct aka one ...
Anonymous
4 years agoNot applicable
I just tried this:
KPI Score =
VAR vResult=CALCULATE(MAX('FactTable'[NB_PARTICIPANTS]))
RETURN
SWITCH(TRUE(),
vResult=0,0,
vResult<50,1,2)
Still giving me cartesian product.
So to recap:
(_result <> 0 ) * _result will give me one row but (_result <> 0 ) * 1 will give me multiple rows.
I need to give a score value that is different from the result itself.
Thanks for your help!
SpartaBI
Community Champion
4 years agoAnonymous I need to go offline for today.
Can you please by tomorrow share a sample PBIX here with the problem and I'll try to solve and share the solution tomorrow.