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.
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.
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 |
---|---|
19 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |