Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have been utilizing the below IF statement - and it works as expected. However, I now need to add an additional parameter to check for Orders that also now start with a "T".
Drop-Ship/Warehouse Order Filter =
IF(
fSales[CustomerID] = "Amazon" && LEFT(fSales[PO],1) <> "U" ,
"Warehouse Order",
"Drop-Ship Order")
When I add in this additional parameter the formula no longer works. Please help. Below is the formula I have created, and have also tried other ways and I feel as if Im not aware of something.
Drop-Ship/Warehouse Order Filter =
IF(
fSales[CustomerID] = "Amazon" && LEFT(fSales[PO],1) <> "U" || fSales[CustomerID] = "Amazon" && LEFT(fSales[PO],1) <> "T" ,
"Warehouse Order",
"Drop-Ship Order")
Please let me know if there is a better way of doing so. Maybe SWITCH will work better. I'll start futsing around with SWITCH.
Thanks in advance!
Solved! Go to Solution.
@AlexAlberga727 , I can't catch you with what you described in your first post,
... add an additional parameter to check for Orders that also now start with a "T".You mean NOT starts with "T" either, right?
You might try to author it this way,
Drop-Ship/Warehouse Order Filter =
IF (
fSales[CustomerID] = "Amazon"
&& NOT LEFT ( fSales[PO], 1 ) IN { "U", "T" },
"Warehouse Order",
"Drop-Ship Order"
)
//if fSales[CustomerID] is "Amazon" and fSales[PO] doesn't start with "U" or "T", then "Warehouse Order", else "Drop-Ship Order"
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@CNENFRNL Thanks for the infomation. However, do you have a solution to the problem I presented, or just throwing out information that im already following.
@AlexAlberga727 , I can't catch you with what you described in your first post,
... add an additional parameter to check for Orders that also now start with a "T".You mean NOT starts with "T" either, right?
You might try to author it this way,
Drop-Ship/Warehouse Order Filter =
IF (
fSales[CustomerID] = "Amazon"
&& NOT LEFT ( fSales[PO], 1 ) IN { "U", "T" },
"Warehouse Order",
"Drop-Ship Order"
)
//if fSales[CustomerID] is "Amazon" and fSales[PO] doesn't start with "U" or "T", then "Warehouse Order", else "Drop-Ship Order"
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
This works for my needs. Thanks a bunch. Interesting way you have coded this one. I have not used IN in that fashion. I'll add this to my quiver.
Thanks!
@CNENFRNL It seems as if I am following that guidince. <> before ||.
Is this how you're interpreting the rules too?
@AlexAlberga727 , yes, <> (comparison operator) is precedent than || (logical operator).
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi, @AlexAlberga727 , operators are assigned different precedences; you might want to refer to this table for details and tweak your formula accordingly.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |