Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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)
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |