Forum Discussion
Anonymous
5 years agoNot applicable
Help with Switch case
Hi, I have to add custom column called "score".For that i have to add switch case as below: CASE WHEN isnull(N_SUM_of_Absolute_us...) THEN 0 WHEN (N_SUM_of_Absolute_us... NOT NULL) and isnul...
- Anonymous5 years ago
Hi Anonymous
Thank you so much.It worked.
Anonymous
5 years agoNot applicable
Anonymous
There is no isnull function in DAX and N_SUM_of_Absolute_us... and Y_SUM_of_Absolute_us... are columns so, need an aggregate function. Try create the measure with ISBLANK():
Measure = SWITCH( TRUE(),
ISBLANK(max([N_SUM_of_Absolute_us...])), 0,
ISBLANK(max([Y_SUM_of_Absolute_us...])), 1,
round(MAX([N_SUM_of_Absolute_us...])/(max([N_SUM_of_Absolute_us...]) + max([Y_SUM_of_Absolute_us...])),4)
)
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi Anonymous
Thank you so much.It worked.