Forum Discussion
telston
2 years agoNew Member
DAX to find current project status
I have a table of different tasks and their scheduled start and end dates. How would I figure out which task is closest to the current date and then display that task in a seperate column in my tabl...
- Anonymous2 years ago
Hi telston ,
According to the error message, DAX cannot compare the value of Date type with the value of Text, you can check whether [start date] is in Text format.
You can check whether [start date] is in text format. You can change it to the correct date format in Power Query - Transform.
Or in Power BI Desktop - Column Tools
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 telston ,
Here are the steps you can follow:
1. Create measure.
Flag =
var _today=TODAY()
var _maxdate=
MAXX(
FILTER(ALL('Table'),
'Table'[Start Date]<_today),[Start Date])
return
IF(
MAX('Table'[Start Date])=_maxdate&&MAX('Table'[End Date])>_today,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
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