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 want to compare below 3 pairs of columes, if any of the planned columes > actual columes, I need it return "Y" to identify partial delivery.
Partial Delivery? = if(OR(FactShipments[PlannedCube]>FactShipments[Cube (m3)],FactShipments[PlannedQty]>FactShipments[Quantity]),FactShipments[PlannedWeight]>FactShipments[Weight (tonne)],"Y","N")
I know I can only include two arguments, so I took off one of them and used
Partial Delivery? = if(OR(FactShipments[PlannedCube]>FactShipments[Cube (m3)],FactShipments[PlannedQty]>FactShipments[Quantity]),"Y","N")
But still, the results did not work correctly, all columes returned "N", can anyone help please? thanks
BeckyS
Solved! Go to Solution.
OR only is able to compare two values. To compare 3, you need to embed another OR statement:
OR( [cond1], OR( [cond2], [cond3] ) )
Alternatively you can use || (pipe, pipe) as shorthand for OR within a logical expression. These you can string together as much as you would need.
[cond1] || [cond2] || [cond3] || [cond4] || etc
Finally, make sure that your data is numeric (not just looks numeric but is treated as such in the model) and that you have the < or > pointing the right direction.
Hope this helps
David
OR only is able to compare two values. To compare 3, you need to embed another OR statement:
OR( [cond1], OR( [cond2], [cond3] ) )
Alternatively you can use || (pipe, pipe) as shorthand for OR within a logical expression. These you can string together as much as you would need.
[cond1] || [cond2] || [cond3] || [cond4] || etc
Finally, make sure that your data is numeric (not just looks numeric but is treated as such in the model) and that you have the < or > pointing the right direction.
Hope this helps
David
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 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |