Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all
I am trying to use a switch with 2 logical conditions. Basically if the column "ES-RQ-225-Param" has a certain text and column "Result" is within the specied column "target", then return "in".
For example, the targets for the following parameters are:
ES-RQ-225Parám | Target | Lookup |
Cloro Residual o Ausente / Chlorine, residual (mg/L) - 0.1 | 0.1 | < |
BOD5 (mg/L) - 50 | 50 | < |
Aluminio / Aluminum (mg/L) - 1.5 | 1.5 | < |
I am using the following formula
Column =
SWITCH(
TRUE(),
'Append'[ES-RQ-225Parám]="Cloro Residual o Ausente / Chlorine, residual (mg/L) - 0.1" && 'Append'[Result] < 'Append'[Target],"In",
'Append'[ES-RQ-225Parám]="BOD5 (mg/L) - 50" && 'Append'[Result] < 'Append'[Target],"In",
'Append'[ES-RQ-225Parám]="Aluminio / Aluminum (mg/L) - 1.5" && 'Append'[Result] < 'Append'[Target],"In",
"Out"
)
As seen, if '[ES-RQ-225Parám]="Cloro Residual o Ausente / Chlorine, residual (mg/L) - 0.1" and [Result] < 'Append'[Target], then I want to have an "In".
In this case for "Cloro Residual o Ausente / Chlorine, residual (mg/L) - 0.1" the target is 0.1 as seen below.
However it's returning me an error:
How can I get it right?
Thanks!
Solved! Go to Solution.
HI @o59393 ,
'You need to convert the data type of 'Target Column' to Decimal Number.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
HI @o59393 ,
'You need to convert the data type of 'Target Column' to Decimal Number.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |