Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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[Weight]),ALLEXCEPT(Append1,Append1[RiskName]))
which is total sum of impact divided by total sum of weight categorized by risk name.
Similarly, Probability_Mean is calculated.
Probability_Mean= calculate(SUM(Append1[Total Probability])/SUM(Append1[Weight]),ALLEXCEPT(Append1,Append1[RiskName]))
Now I would like to create another calculated column using these two calculated columns i.e.
Solved! Go to Solution.
Hi @gupta_diksha ,
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
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @gupta_diksha ,
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
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
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
@gupta_diksha Is it possible for you to share your PBIX file after removing sensitive data?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
After correcting the data type and applying Trunc, It is working fine now.
Thank you very much for your help.
@gupta_diksha can you share a screenshot of the table with these calculated columns and their result.
Sure.
User | Count |
---|---|
128 | |
108 | |
99 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |