Forum Discussion
Filter data table based on today
- 1 year ago
Dear DataNinja777 and Ashish_Mathur,
Based on your input and and examples I managed to study the problem and the logic of DAX for which I am tremendously grateful.
Here is how I solved the problem, and seems to be okay, but requires further testing and possible adjustments:
When = switch(True(),[StartDate]=today(),"Today",[Startdate]>today() && [Startdate]<today()+14,"Soon",[Startdate]<today() && [DueDate]<today(),"Past",today()>[StartDate] && today()<=[DueDate], "Present",[Startdate]>=today()+14,"Future")This basically divides the past works, ongoing works, expected start of works "soon", and future works plus I added today's starting works as an added coloum to my data table.
Hi DataNinja777 ,
Thank you very very much for the detailed description it cleared up some questions in my mind and some how-to s.
Regarding the "Today" coloumn
- ongoing works would be those tasks that starts "today" AND "start date < today < due date" - tasks that has started in the past but due date is not yet today
- instead of "future" I would like to limit for two weeks only (I have 1200+ tasks, up to 3,5 years), aka something like "today+1 < (soon) < today+14"
These logical parameters - combining with your first reply - will let me finish the charts for this section.
Later on I intend to publish it to online I assume these pre-defined connections will also work?
(online is needed so I can link it with Power Automate to refresh charts on days I specify - making it independent from my laptop)
Best regards,
Hi,
I have solved a similar problem in the attached file.
Hope this helps.