Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I have this power query.
Table.AddColumn(#"Added 'Absolute Difference Qty(PIC)'", "Comment",
each if [#"Absolute Difference Qty(PIC)"] = null then "Empty Location"
else if [#"Absolute Difference Qty(PIC)"] = 0 then ""
else if [#"Absolute Difference Qty(PIC)"] > 0 or [#"Absolute Difference Qty(PIC)"] <= 30 then "Difference - 1 to 30 Picks"
else if [#"Absolute Difference Qty(PIC)"] > 30 or [#"Absolute Difference Qty(PIC)"] <= 60 then "Difference - 31 to 60 Picks"
else if [#"Absolute Difference Qty(PIC)"] > 60 or [#"Absolute Difference Qty(PIC)"] <= 90 then "Difference - 61 to 90 Picks"
else if [#"Absolute Difference Qty(PIC)"] > 90 then "Difference - 90+"
else "No result", type text)
These two lines eam to be working as intended:
each if [#"Absolute Difference Qty(PIC)"] = null then "Empty Location"
else if [#"Absolute Difference Qty(PIC)"] = 0 then ""
Then rest of the results are coming back as 1-30
else if [#"Absolute Difference Qty(PIC)"] > 0 or [#"Absolute Difference Qty(PIC)"] <= 30 then "Difference - 1 to 30 Picks"
even tho they should be different range.
I can't spot any exact problem why results are all returned for 1-30 if statment.
Here is some example of results I get.
Anyone know where I made a mistake, I made simpler else if before and they had no problem.
Maybe I over complicated query is some way.
Solved! Go to Solution.
Found the problems. I should have used 'and' instead of 'or'
Found the problems. I should have used 'and' instead of 'or'