Join 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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi!
I have searched for awhile and I can't seem to find a solution.... I have a dashboard matrix which is broken out by Month in the columns. Underneath each month is a ranking (from 1st - 200th depending on the month), a name, # in sales, and $ in sales. Each month there is a set of "favorite names" and they change depending on the month. I need to be able to highlight those names within the month and I was thinking if I made some sort of DAX to distinguish these favorite names, I can do a conditional rule where that name is highlighted yellow.
Basically the DAX that I am trying to build would go something like this:
IF [month] = "January" OR "February"" AND [favorite name] = "John" or "Sam" or "Joe" (etc), then "F" else blank
IF [month] = "March" OR "APRIL" OR "MAY" AND [favorite name] = "Sue" OR "Anne" OR "Rose" then "F" else blank
ETC for each month.
Thank you!
Solved! Go to Solution.
You could use a SWITCH statement
SWITCH(
TRUE(),
(month = "January" || month = "February") && [favorite name] IN {John,Sam,Joe},
.
.
BLANK()
)You can refine the above syntax.
As @SachinNandanwar points out, using both SWITCH ( TRUE(), ... ) and IN syntax will help with this:
SWITCH (
TRUE (),
[month] IN { "January", "February" }
&& [favorite name] IN { "John", "Sam", "Joe" }, "F",
[month] IN { "March", "April" }
&& [favorite name] IN { "Sue", "Anne", "Rose" }, "F",
[ ... ],
BLANK ()
)
As @SachinNandanwar points out, using both SWITCH ( TRUE(), ... ) and IN syntax will help with this:
SWITCH (
TRUE (),
[month] IN { "January", "February" }
&& [favorite name] IN { "John", "Sam", "Joe" }, "F",
[month] IN { "March", "April" }
&& [favorite name] IN { "Sue", "Anne", "Rose" }, "F",
[ ... ],
BLANK ()
)
You could use a SWITCH statement
SWITCH(
TRUE(),
(month = "January" || month = "February") && [favorite name] IN {John,Sam,Joe},
.
.
BLANK()
)You can refine the above syntax.
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 |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |