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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Antonin
Frequent Visitor

Project status based on tasks status and date of the report

Hi everyone,

 

I am new in DAX and i need your help !

We have the report of all the project every month and I am creating a dashboard with a data history.

 

With this forum, i could manage to create the project status based on tasks status but not taking in consideration the date of the report :

Antonin_0-1644268440862.png

For example for the project 1 in date of 22022, the answer should be Finished and not In progress.

 

Here my DAX :

Project Status = 
  VAR p = SUMMARIZE(FILTER('Table','Table'[Project Name]=EARLIER([Project Name])),'Table'[Tasks status])
RETURN
  IF(MAXX(p,'Table'[Tasks status])="Finished" && COUNTROWS(p)=1,"Finished","In progress")

 

Any help is appreciated, thank you so much!

Best regards,

 

Antonin

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Antonin 

Try this code to add a new column with DAX:

Project Status = 
VAR _T =
    CALCULATETABLE (
        FILTER ( 'Table', 'Table'[Task Status] <> "Finished" ),
        ALLEXCEPT ( 'Table', 'Table'[Date], 'Table'[Project Name] )
    )
VAR _A =
    COUNTROWS ( _T )
RETURN
    IF ( ISBLANK ( _A ), "Finished", "In Progress" )

 

Output:

VahidDM_0-1644276507650.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

3 REPLIES 3
ValtteriN
Super User
Super User

Hi,

Try something like this:

var _project = ProjectStatus[Project] return
if(CONTAINS(FILTER(all(ProjectStatus),ProjectStatus[Project]=_project),ProjectStatus[Status],"Finished"),"Finished","NF")
 
ValtteriN_0-1644276610690.png



I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




VahidDM
Super User
Super User

Hi @Antonin 

Try this code to add a new column with DAX:

Project Status = 
VAR _T =
    CALCULATETABLE (
        FILTER ( 'Table', 'Table'[Task Status] <> "Finished" ),
        ALLEXCEPT ( 'Table', 'Table'[Date], 'Table'[Project Name] )
    )
VAR _A =
    COUNTROWS ( _T )
RETURN
    IF ( ISBLANK ( _A ), "Finished", "In Progress" )

 

Output:

VahidDM_0-1644276507650.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Hi @VahidDM,

Works perfectly, thank you so much !


Best regards,

 

Antonin

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.