Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Please advis, with the below error... "Too few arguments were passed to the AND function. The minimum argument count for the function is 2." Not sure what's wrong, this work in excel formula.
FINAL Column=
IF(AND('Column1'[Value]<> "Other"), 'Column2'[Value],
(IF(AND('Column1'[Value]="Other", 'Column2'[Value]<>"Other"),'Column2'[Value],
(IF(AND('Column1'[Value]="Other", 'Column2'[Value]="Other",'Column3'[Value]<>"Other"),'Column3'[Value],
(IF(AND('Column1'[Value]="Other", 'Column2'[Value]="Other",''Column3'[Value]="Other",'Column4'[Value]<>"Other"), 'Column4'[Value],"Other")))))))
Solved! Go to Solution.
@Tevon713 can you try this
FINAL Column =
SWITCH (
TRUE (),
'Column1'[Value] <> "Other", 'Column2'[Value],
'Column1'[Value] = "Other" && 'Column2'[Value] <> "Other", 'Column2'[Value],
'Column1'[Value] = "Other" && 'Column2'[Value] = "Other" && 'Column3'[Value] <> "Other", 'Column2'[Value],
'Column1'[Value] = "Other" && 'Column2'[Value] = "Other" && 'Column3'[Value] = "Other" && 'Column4'[Value] <> "Other", 'Column4'[Value],
"Other"
)
Apart from the IF and AND being messy and hard to read, I think you have a problem with your referencing of columns.
It is Table[Column] not Column[Value].
Try this...
(Change 'T' to whatever your table is called)
FINAL Column =
SWITCH (
TRUE (),
T[Column1] <> "Other", T[Column2],
T[Column1] = "Other"
&& T[Column2] = "Other"
&& T[Column3] = "Other"
&& T[Column4] <> "Other", T[Column4],
T[Column1] = "Other"
&& T[Column2] <> "Other", T[Column2],
T[Column1] = "Other"
&& T[Column2] = "Other"
&& T[Column3] <> "Other", T[Column3],
"Other"
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Apart from the IF and AND being messy and hard to read, I think you have a problem with your referencing of columns.
It is Table[Column] not Column[Value].
Try this...
(Change 'T' to whatever your table is called)
FINAL Column =
SWITCH (
TRUE (),
T[Column1] <> "Other", T[Column2],
T[Column1] = "Other"
&& T[Column2] = "Other"
&& T[Column3] = "Other"
&& T[Column4] <> "Other", T[Column4],
T[Column1] = "Other"
&& T[Column2] <> "Other", T[Column2],
T[Column1] = "Other"
&& T[Column2] = "Other"
&& T[Column3] <> "Other", T[Column3],
"Other"
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
@Tevon713 can you try this
FINAL Column =
SWITCH (
TRUE (),
'Column1'[Value] <> "Other", 'Column2'[Value],
'Column1'[Value] = "Other" && 'Column2'[Value] <> "Other", 'Column2'[Value],
'Column1'[Value] = "Other" && 'Column2'[Value] = "Other" && 'Column3'[Value] <> "Other", 'Column2'[Value],
'Column1'[Value] = "Other" && 'Column2'[Value] = "Other" && 'Column3'[Value] = "Other" && 'Column4'[Value] <> "Other", 'Column4'[Value],
"Other"
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
78 | |
63 | |
52 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
61 | |
60 |