Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello All
I have these two DAX measures. I basically need to color one column two different colors (Red if date in other column is within 45 days and Yellow if within 60 days. I will need the 45 day rule to have higher precedent so that it overrides the 60 day Yellow when the appropriate time comes.
Does anyone know how to nest these two statements together and give the 45 day higher precedent?
45_Day_Color = if(FIRSTNONBLANK(Elig_List[45_Day_Alert],TODAY()) <today(),"red","white")
60_Day_Color = if(FIRSTNONBLANK(Elig_List[60_Day_Alert],TODAY()) <today(),"yellow","white")
I appreciate any help!
Solved! Go to Solution.
Hi @Userpath77 ,
I believe SWITCH would help here.
MEASURE =
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[ColumnWithDate])-TODAY()<45,
"RED",
SELECTEDVALUE('Table'[ColumnWithDate])-TODAY()<60,
"YELLOW",
"WHITE"
)
Hi @Userpath77 ,
I believe SWITCH would help here.
MEASURE =
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[ColumnWithDate])-TODAY()<45,
"RED",
SELECTEDVALUE('Table'[ColumnWithDate])-TODAY()<60,
"YELLOW",
"WHITE"
)
Thanks Payeras-----I had to adjust it a little, but worked perfect! Thanks again.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |