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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Netope
Helper I
Helper I

Site status classficiation based on different project status

Dear community:

 

I have two tables one for site status, and the other table with project status by site where one site may have multiple projects.

 

In the site status table I have a column for status, but I need this colums to be calculated based on a logic wich considers the different status for projects assigned to that site in the project status table. I have a relationship built for both tables using the site column.

 

This is the logic:

 

If at least one project is running, the site status is running (no matter is there are other projects with status closed or not started in the project status table)

If all projects are closed, then the sites status is closed

If all projects are not yet started then the site status is planned

If there are no projects for a site, then the site status is not planned

 

Here is an example:

Project Status Table

ProjectSiteStatus
1ARunning
2AClosed
3ANot Started
4BClosed
5BClosed
6CNot started
7CNot Started

 

Then, using the logic, I shoud see the following values in the site status colum:

 

SiteStatus
ARunning
BClosed
CPlanned
DNot Planned

 

As site D is not listed in the project status table, the status for that site should be Not Planned

 

Thanks in advance for your support!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

1. Create a reference table

 

Status Status ID
Not Planned 0
Not Started 1
Running 2
Closed 3

 

2. For each Site find the MINX of the Status ID. Add 0 if you want to cover site D.

 

3. Lookup the Status name for the result.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

1. Create a reference table

 

Status Status ID
Not Planned 0
Not Started 1
Running 2
Closed 3

 

2. For each Site find the MINX of the Status ID. Add 0 if you want to cover site D.

 

3. Lookup the Status name for the result.

I am struglin with the coding, would you please help wiht it? Thanks!

lbendlin_0-1717624966065.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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