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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
kpeterson
Frequent Visitor

Project Status from Multiple Status

I'm looking to create a new column or even a new table that looks at criteria in two columns.  The new column needs to look at the "Project Regulatory Code" and look at whether all projects for each regulatory code group are Complete and return Complete or In Progress if they are not.  I can't seem to figure out how to accomplish this. TIA!

 

kpeterson_1-1704222969208.png

 

 

4 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@kpeterson 

you can try this

Column = if(countx(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])),'Table'[Regular Phase])=COUNTX(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])&&'Table'[Status]="Complete"),'Table'[Regular Phase]),"Complete","In progress")

11.PNG

pls see the attachment below





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

Proud to be a Super User!




View solution in original post

Ritaf1983
Super User
Super User

Hi @kpeterson 

There are my steps in PQ to achieve a goal 

1. I duplicated the table

Ritaf1983_0-1704252627509.png

2. Removed from the new table all columns except for code and status :

Ritaf1983_1-1704252711857.png

3 Grouped the code by statuses and counted distinct rows

Ritaf1983_2-1704252795513.png

4. Merged this new table with the original:

Ritaf1983_3-1704252852827.png

Ritaf1983_4-1704252900176.png

6. created a conditional column that checks how many distinct statuses have code and if it is "complete"

Ritaf1983_5-1704252995915.png

7. removed unnecessary column of counting and switched off the loading to the model the table that i created for grouping

 

Result

Ritaf1983_6-1704253143545.png

pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Thank you for your reply and this worked really well. Thanks!

View solution in original post

Thank you for your reply.  After some QC, I also need to add a line for "if all Not Started" then Not Started.  Is that possible to add? TIA!

View solution in original post

6 REPLIES 6
Ritaf1983
Super User
Super User

Hi @kpeterson 

There are my steps in PQ to achieve a goal 

1. I duplicated the table

Ritaf1983_0-1704252627509.png

2. Removed from the new table all columns except for code and status :

Ritaf1983_1-1704252711857.png

3 Grouped the code by statuses and counted distinct rows

Ritaf1983_2-1704252795513.png

4. Merged this new table with the original:

Ritaf1983_3-1704252852827.png

Ritaf1983_4-1704252900176.png

6. created a conditional column that checks how many distinct statuses have code and if it is "complete"

Ritaf1983_5-1704252995915.png

7. removed unnecessary column of counting and switched off the loading to the model the table that i created for grouping

 

Result

Ritaf1983_6-1704253143545.png

pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
ryan_mayu
Super User
Super User

@kpeterson 

you can try this

Column = if(countx(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])),'Table'[Regular Phase])=COUNTX(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])&&'Table'[Status]="Complete"),'Table'[Regular Phase]),"Complete","In progress")

11.PNG

pls see the attachment below





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

Proud to be a Super User!




Thank you for your reply.  After some QC, I also need to add a line for "if all Not Started" then Not Started.  Is that possible to add? TIA!

@kpeterson 

pls try this

Column = if(countx(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])),'Table'[Regular Phase])=COUNTX(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])&&'Table'[Status]="Not Started"),'Table'[Regular Phase]),"Not Started",if(countx(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])),'Table'[Regular Phase])=COUNTX(FILTER('Table','Table'[Regular Phase]=EARLIER('Table'[Regular Phase])&&'Table'[Status]="Complete"),'Table'[Regular Phase]),"Complete","In progress"))

11.PNG





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

Proud to be a Super User!




Thank you for your reply and this worked really well. Thanks!

you are welcome





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

Proud to be a Super User!




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.