Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
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 isnull(Y_SUM_of_Absolute_us...) THEN 1
ELSE round(N_SUM_of_Absolute_us.../(N_SUM_of_Absolute_us... + Y_SUM_of_Absolute_us...), 4)
END
Can someone help me how to do this.
Thanks.
Solved! Go to Solution.
@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.
Hi @Anonymous
Thank you so much.It worked.
Hi, @Anonymous , you may apply such a pattern to your measure,
Measure =
SWITCH( TRUE(),
ISNULL(N_SUM_of_Absolute_us...), 0,
ISNULL(Y_SUM_of_Absolute_us...), 1,
round(N_SUM_of_Absolute_us.../(N_SUM_of_Absolute_us... + Y_SUM_of_Absolute_us...), 4)
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @CNENFRNL ,
When am trying to apply that it is showing the below error.
Note : Even i changed the table name.still it showing the same error.
Thanks.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 53 | |
| 42 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 111 | |
| 104 | |
| 36 | |
| 28 | |
| 27 |