Forum Discussion
due date filter
- Anonymous2 years ago
Hi esuryahadi ,
You can also create a measure.
conditions = SWITCH(TRUE(), MAX('Table'[Status])="done","black", MAX('Table'[End Date]) > TODAY(),"red", DATEDIFF(MAX('Table'[End Date]),TODAY(),DAY)<30,"yellow" )Setting the Conditional Format.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous2 years ago
Hi esuryahadi ,
I'm sorry I don't quite understand, the IDContract is 3 and 5 when the end date is 2024/2/20 and 2023/12/12. today's date is 2023/11/3 and the end date is greater than today, shouldn't he show red?
According to your description,
(1) We can create a table.
Slicer = DATATABLE ( "Type", STRING, { { "< 30 day"}, { "> Today" }, { "Done/Complete" } } )(2) We can create measures.
conditions = SWITCH(TRUE(), MAX('Table'[Status])="done","black", MAX('Table'[End Date]) > TODAY(),"red", DATEDIFF(MAX('Table'[End Date]),TODAY(),DAY)<30,"yellow" )Flag = SWITCH(TRUE(), ISFILTERED('Slicer'[Type])=FALSE(),1, SELECTEDVALUE('Slicer'[Type])="< 30 day" && [conditions]="yellow",1, SELECTEDVALUE('Slicer'[Type])="> Today" && [conditions]="red",1, SELECTEDVALUE('Slicer'[Type])="Done/Complete" && [conditions]="black",1,0)(3) Setting the conditional format and filtering [Flag=1] as a visual object.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi esuryahadi ,
I'm sorry I don't quite understand, the IDContract is 3 and 5 when the end date is 2024/2/20 and 2023/12/12. today's date is 2023/11/3 and the end date is greater than today, shouldn't he show red?
According to your description,
(1) We can create a table.
Slicer = DATATABLE (
"Type", STRING,
{
{ "< 30 day"},
{ "> Today" },
{ "Done/Complete" }
}
)
(2) We can create measures.
conditions = SWITCH(TRUE(),
MAX('Table'[Status])="done","black",
MAX('Table'[End Date]) > TODAY(),"red",
DATEDIFF(MAX('Table'[End Date]),TODAY(),DAY)<30,"yellow"
)Flag = SWITCH(TRUE(),
ISFILTERED('Slicer'[Type])=FALSE(),1,
SELECTEDVALUE('Slicer'[Type])="< 30 day" && [conditions]="yellow",1,
SELECTEDVALUE('Slicer'[Type])="> Today" && [conditions]="red",1,
SELECTEDVALUE('Slicer'[Type])="Done/Complete" && [conditions]="black",1,0)
(3) Setting the conditional format and filtering [Flag=1] as a visual object.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much you help.