Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ykankam
Helper I
Helper I

Power BI Project Management

how do I write dax formula to show all projects where End date is past due and “Project Status” doesn’t show “Complete” or “Cancelled”

1 ACCEPTED SOLUTION

&& works but the message i have is "DAX comparison operations do not support comparing values of type Text with values of type Date. Consider using the VALUE or FORMAT function to convert one of the values."

 

I am unable to use the new column for any visualization.

 

Best,

 

Yeboah

View solution in original post

14 REPLIES 14
Ykankam
Helper I
Helper I

Ykankam_0-1657693582179.png

Code was correct.I had to go to transform data and change  [End] to a date format.

Ykankam
Helper I
Helper I

The dataset name is Bio Demand, just in case you will need it for the DAX

 

Thanks,

 

Yeboah

@Ykankam , Try a measure like

 

Countrows(filter( Table, Not(isblank(Table[end date])) && [End Date] <= today() && not Table[Project Status] in {"Complete","Cancelled"}))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Do I format this a text? Because when I select this measure, it is unable to display on any visual

Dhacd
Resolver III
Resolver III

@Ykankam 
Can you share sample data for all these columns? 

Regards,
Atma.

Ykankam_0-1657689302329.png

So basically, a dax formula that will create a new column by flagging a project either overdue or not overdue. Secondly, another dax formula that will create a new column a that will flag a past due project whose project status doesn't show  "completed" or "cancelled", we can flag such projects as "past due - check"

Can you check whether the below code works or not?
Due status:

 

Due Status= if([end]<=today(),"Overdue", "Not Overdue")

 

Past Due check:

 

PastDueCheck = if([Due status]= "Overdue" and([Project Status]<> "Completed" or [Project Status]<> "Cancelled", "Past Due-Check")

 

 
Or you can do both in a single column.

 

PastDueCheck= if([end]<=today() and ([Project Status]<> "Completed" or [Project Status]<> "Cancelled", "Past Due-Check")

 


Reply if there is any issues,

If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.

Regards,

Atma.

Ykankam_0-1657690855316.png

I tried to do all in one column, here is the error message I got.

 

Regards,

 

Yeboah

 

Sure, I will try this. Do I need to format this new column as text?

 

Regards,

 

Yeboah

My Bad here is the single column code updated

 

PastDueCheck= if([end]<=today() and ([Project Status]<> "Completed" or [Project Status]<> "Cancelled"), "Past Due-Check")

Use the above code and confirm,

If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.

Regards,
Atma.

Ykankam_0-1657692277655.png

 

Same error.

 

Apologied, 
Can you use && instead of and 
|| instead of OR

PastDueCheck= if([end]<=today() && ([Project Status]<> "Completed" || [Project Status]<> "Cancelled"), "Past Due-Check")


And try this code.

 

If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.
Regards,
Atma.

&& works but the message i have is "DAX comparison operations do not support comparing values of type Text with values of type Date. Consider using the VALUE or FORMAT function to convert one of the values."

 

I am unable to use the new column for any visualization.

 

Best,

 

Yeboah

Thanks, 
can you mark my post as a solution? That would be a help.

Regards,
Atma.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.