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 am trying to implement the nested IF with AND operator in DAX. Please see the below condition and help me.
Actually, I am trying to check two compound conditions in one row. The blue colored texts checking and returning the value of the corresponding cell from column (AE) into column "Lift UT" If all the conditions are true and if not true then pointer going to the next condition and checking the red colored texts. if all the red colored conditions are true then returning the value of the corresponding cell from column ( AE) into the column "Lift UT". if both (Blue and Red Colored conditions are not true then 'Lift UT" column getting Blank Space.
Please check the below excel column conditions and table.
=IF(AND(AX3="Y",A3="CYLV",AW3=1, AQ3="Debit"),AE3,IF(AND(AX3="N",A3="CYLV",AW3=1),AE3,""))
A | AE | AQ | AW | AX | Lift UT |
CYLV | 3 | Debit | 1 | Y | 3 |
CYLV | 1 | Credit | 1 | Y | |
CYLV | 1 | Debit | 1 | N | 1 |
CFLB | 5 | Debit | 1 | Y | |
CFLB | 2 | Debit | 2 | Y | |
CYLV | 1 | Debit | 3 | N | |
CYLV | 3 | Debit | 1 | Y | 3 |
CFLB | 2 | Debit | 1 | Y | |
CYLV | 1 | Debit | 1 | N | 1 |
Solved! Go to Solution.
Hey,
unfortunately you did not use the "Insert Code" function to paste your DAX statement.
The Problem is raised by the 2nd switch, please be aware that AND(..., ...) just accepts 2 conditions for this reason you statement has to look like this
SWITCH(TRUE() AND(AND(C1, C2), AND(C3, C4)), this, AND(AND(C1, C2), C3), that )
Hopefully this resolves your issue.
Regards
Tom
Hey,
using DAX you have to combine multiple AND, this due to the fact that AND just takes 2 conditions, like so
IF( AND( AND(condtion1, condition2) ,AND(condtion3 condition4) ) ,what should happen if the above is true ,...
Hopefully this is what you are looking for.
Regards
Tom
Hi Tom,
Thanks for your help but I am still having the issue please check the below syntax error and advise.
Anyone can help me, please.
Thanks.
Hey,
unfortunately you did not use the "Insert Code" function to paste your DAX statement.
The Problem is raised by the 2nd switch, please be aware that AND(..., ...) just accepts 2 conditions for this reason you statement has to look like this
SWITCH(TRUE() AND(AND(C1, C2), AND(C3, C4)), this, AND(AND(C1, C2), C3), that )
Hopefully this resolves your issue.
Regards
Tom
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
52 | |
39 | |
26 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |