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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

 

2 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

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

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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