Forum Discussion
user_34
2 years agoFrequent Visitor
Creating a table which has dynamic header and data
Hi all I am creating a new table in which I am creating a date picker using this DAX Calendar = VAR Days = CALENDAR ( DATE ( 2024, 1, 1 ), DATE ( 2024, 12, 31 ) ) RETURN ADDCOLUMNS ( Days, "Fo...
- Anonymous2 years ago
Hi user_34 ,
Thanks for the reply from amitchandak , please allow me to provide another insight:
Here are the steps you can follow:
1. Create measure.
color = var _today=TODAY() return SWITCH( TRUE(), MAX('Table'[Date])=_today&&MAX('Table'[Final time])>=MAX('Table'[Start Time])&&MAX('Table'[Final time])<=MAX('Table'[Target Time]),"green", MAX('Table'[Date])=_today&&MAX('Table'[Final time])=BLANK()&&MAX('Table'[Start Time])>MAX('Table'[Target Time]),"red", MAX('Table'[Date])=_today&&MAX('Table'[Final time])=BLANK()&&MAX('Table'[Start Time])<MAX('Table'[Target Time]),"yellow")2. Select filed – Conditional formatting – Background color.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
2 years agoNot applicable
Hi user_34 ,
Thanks for the reply from amitchandak , please allow me to provide another insight:
Here are the steps you can follow:
1. Create measure.
color =
var _today=TODAY()
return
SWITCH(
TRUE(),
MAX('Table'[Date])=_today&&MAX('Table'[Final time])>=MAX('Table'[Start Time])&&MAX('Table'[Final time])<=MAX('Table'[Target Time]),"green",
MAX('Table'[Date])=_today&&MAX('Table'[Final time])=BLANK()&&MAX('Table'[Start Time])>MAX('Table'[Target Time]),"red",
MAX('Table'[Date])=_today&&MAX('Table'[Final time])=BLANK()&&MAX('Table'[Start Time])<MAX('Table'[Target Time]),"yellow")
2. Select filed – Conditional formatting – Background color.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly