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 have a simple IF statement which is returning inconsistent results and I can'T figure out why. I would greatly appreciate any help in this.
This is the IF statement where I want it to return a "YES" when the value is less than 24 else "NO".
InboundTime(Hours) | KPI Achieved |
164 | YES |
2502 | NO |
-1 | YES |
22 | YES |
-1 | YES |
26 | NO |
26 | NO |
21 | YES |
145 | YES |
168 | YES |
50 | NO |
50 | NO |
1 | YES |
1 | YES |
50 | NO |
1517 | YES |
Solved! Go to Solution.
I would assume that the first column is not formatted correctly. Can you check that it's stored as whole number/decimal number?
I would assume that the first column is not formatted correctly. Can you check that it's stored as whole number/decimal number?
@Anonymous , @FrankAT I think that may be at the core of my woes. The column is a product of a datediff function. I reformmated my IF statement as IF('Inbound'[InboundTime(Hours)] <= 24 , "YES","NO") with a space after the 24 and it seems to be working, atleast for the sample data I have for now, it's returning concistent results.
Unfortunately this did not work in my case.
Hi @eWise ,
you try an alphabetical compare of text "24", so your "inconsistent results" are in this term correct.
If you want a numerical compare you can do it like this:
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |