Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a dax like
status =
IF ( Number < 10,"Poor",
IF (Color = "Black", "Good")," No Comment"
I have seen people writing such condition writing IF only once ( I may be wrong)
Status = IF ( Number <10,Color = "Black")----
Is it possible ?
Solved! Go to Solution.
@BishwaR You can use && for AND and || for OR conditions in filters. I'll be writing a blog on this soon as you're the second person in as many days to have a similar question.
You can either use SWITCH or continue with IF. Here is how you could write using SWITCH (note order matters so anything less than 10 will be poor, even if the color is black):
status =
SWITCH ( TRUE()
, Number < 10,"Poor"
, Color = "Black", "Good",
" No Comment"
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@BishwaR You can use && for AND and || for OR conditions in filters. I'll be writing a blog on this soon as you're the second person in as many days to have a similar question.
You can either use SWITCH or continue with IF. Here is how you could write using SWITCH (note order matters so anything less than 10 will be poor, even if the color is black):
status =
SWITCH ( TRUE()
, Number < 10,"Poor"
, Color = "Black", "Good",
" No Comment"
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |