Forum Discussion
Anonymous
4 years agoNot applicable
Create a calculated column using another calculated column
Hi, I'm confronting a problem that I'm not able to solve. I request your help on this. I created a column by using the formula Impact_Mean= calculate(SUM(Append1[Total Impact])/SUM(Append1[...
- 4 years ago
Hi Anonymous ,
Could you please try below code:-
TEST = SWITCH ( TRUE (), TRUNC ( Append1[Impact_Mean] ) = 4 && TRUNC ( Append1[Probability_Mean] ) = 4, "4", TRUNC ( Append1[Impact_Mean] ) = 4 && TRUNC ( Append1[Probability_Mean] ) = 3, "1", TRUNC ( Append1[Impact_Mean] ) = 5 && TRUNC ( Append1[Probability_Mean] ) = 5, "2", "0" )BR,
Samarth
Samarth_18
4 years agoCommunity Champion
Hi Anonymous ,
Could you please try below code:-
TEST =
SWITCH (
TRUE (),
TRUNC ( Append1[Impact_Mean] ) = 4
&& TRUNC ( Append1[Probability_Mean] ) = 4, "4",
TRUNC ( Append1[Impact_Mean] ) = 4
&& TRUNC ( Append1[Probability_Mean] ) = 3, "1",
TRUNC ( Append1[Impact_Mean] ) = 5
&& TRUNC ( Append1[Probability_Mean] ) = 5, "2",
"0"
)
BR,
Samarth
- Anonymous4 years agoNot applicable
Hi,
Thank you for the suggestion. It is giving me Non-Zero values in Column "Test" but these values are not correct as per the condition applied
Thank you in advance
- Samarth_184 years agoCommunity Champion
Anonymous Is it possible for you to share your PBIX file after removing sensitive data?
- Anonymous4 years agoNot applicable
After correcting the data type and applying Trunc, It is working fine now.
Thank you very much for your help.