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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

Change Status base from Progress

Hi and good day,

Can someone help me on my table on how to achieved my desired output. Basically in one ID let say Room01.
     a. if the Trade Painting or D. Scaff is lessthan 100 = Partial Completed 
     b. if one of the Trade is started  = On- going
     c.  if none of the Trade started = Not Started
     d. if all the Trade in ID are 100 = Completed

AllanBerces_0-1733102936677.png

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AllanBerces ,

Perhaps the following expression:

Measure = var _D = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="D.Scaff"))
var _P = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="Painting"))
var _Start = CALCULATE(AVERAGE('Table'[Work%]),ALLEXCEPT('Table','Table'[ID]))
var _Unkonwn = IF( NOT MAX('Table'[Trade]) IN VALUES('Table'[Trade]),1,0)
RETURN SWITCH(TRUE(),
_P>10&&_P<100&&_Start<>100,"Partial Completed",
_D>10&&_D<100&&_Start<>100,"Partial Completed",
_Start>0&&_Start<>100,"On-going",
_Start=0,"Not Started",
_Start=100,"Completed",
_Unkonwn=1,"Unknown"
)

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @AllanBerces ,

With the current logic, each room is not fully adapted to the conditions, please try more restrictions to adjust:

vtianyichmsft_0-1733192720390.png

Measure = var _D = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="D.Scaff"))
var _P = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="Painting"))
var _Start = CALCULATE(AVERAGE('Table'[Work%]),ALLEXCEPT('Table','Table'[ID]))
RETURN SWITCH(TRUE(),
_P>10&&_P<100&&_Start<>100,"Partial Completed",
_D>10&&_D<100&&_Start<>100,"Partial Completed",
_Start>0&&_Start<>100,"On-going",
_Start=0,"Not Started",
_Start=100,"Completed"
)

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Hi @Anonymous thank you for the reply, just one question how can add if i want to filter Trade is not equal to unknown. 

 

Thank you

Hi @Anonymous thank you very much for the reply, but what i mean is from the measure below how can i incorporate if i want to filter out trade is not equal to unknown.

AllanBerces_0-1733218027550.png

Thank you very much

 

Anonymous
Not applicable

Hi @AllanBerces ,

Perhaps the following expression:

Measure = var _D = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="D.Scaff"))
var _P = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="Painting"))
var _Start = CALCULATE(AVERAGE('Table'[Work%]),ALLEXCEPT('Table','Table'[ID]))
var _Unkonwn = IF( NOT MAX('Table'[Trade]) IN VALUES('Table'[Trade]),1,0)
RETURN SWITCH(TRUE(),
_P>10&&_P<100&&_Start<>100,"Partial Completed",
_D>10&&_D<100&&_Start<>100,"Partial Completed",
_Start>0&&_Start<>100,"On-going",
_Start=0,"Not Started",
_Start=100,"Completed",
_Unkonwn=1,"Unknown"
)

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

 

Hi @Anonymous thank you very much for the reply, its work perfectly.

Anonymous
Not applicable

Hi @AllanBerces ,

 

You can try the following expression:

Measure 2 = IF( NOT MAX('Table'[Trade]) IN VALUES('Table'[Trade]),1,0)

A 1 represents an item that is not in the original trade, and a 0 represents an item that is present.

vtianyichmsft_0-1733217557921.png

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors