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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need overall status based on individual

Hi Team,

Need overall status based on individual status.

PFB DATA

Job     Status

job1    completed

job2     running

job3     cancelled

job4  Completd

 

 

i need overall status like if all jobs completed then complted ,if few jobs completed and few jobs running then running,if fewjobs completd and fewjobs running and few jobs cancelled then cancelled ,if few jobs active and few jobs cancelled then cancelled.

 

Please help me on this

 

Regards,

Ravi

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

You may create a measure like below to see if it works.

Overall Status = 
var _completed = 
CALCULATE(
    DISTINCTCOUNT('PFB DATA'[Job]),
    FILTER(
        ALL('PFB DATA'),
        'PFB DATA'[Status]="completed"
    )
)
var _running =
CALCULATE(
    DISTINCTCOUNT('PFB DATA'[Job]),
    FILTER(
        ALL('PFB DATA'),
        'PFB DATA'[Status]="running"
    )
)
var _cancelled =
CALCULATE(
    DISTINCTCOUNT('PFB DATA'[Job]),
    FILTER(
        ALL('PFB DATA'),
        'PFB DATA'[Status]="cancelled"
    )
)
return
IF(
    _cancelled>0,
    "cancelled",
    IF(
        _completed = CALCULATE(DISTINCTCOUNT('PFB DATA'[Job]),ALL('PFB DATA')),
        "completed",
        "running"
    )
)

 

Result:

b1.png

 

Best Regards

Allan

 

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
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.

 

Best Regards

Allan

v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

You may create a measure like below to see if it works.

Overall Status = 
var _completed = 
CALCULATE(
    DISTINCTCOUNT('PFB DATA'[Job]),
    FILTER(
        ALL('PFB DATA'),
        'PFB DATA'[Status]="completed"
    )
)
var _running =
CALCULATE(
    DISTINCTCOUNT('PFB DATA'[Job]),
    FILTER(
        ALL('PFB DATA'),
        'PFB DATA'[Status]="running"
    )
)
var _cancelled =
CALCULATE(
    DISTINCTCOUNT('PFB DATA'[Job]),
    FILTER(
        ALL('PFB DATA'),
        'PFB DATA'[Status]="cancelled"
    )
)
return
IF(
    _cancelled>0,
    "cancelled",
    IF(
        _completed = CALCULATE(DISTINCTCOUNT('PFB DATA'[Job]),ALL('PFB DATA')),
        "completed",
        "running"
    )
)

 

Result:

b1.png

 

Best Regards

Allan

 

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

Anonymous
Not applicable

Hi,

 

I think you can use this measure to display the status based on your criteria:

JobStatus = if(CONTAINS(Jobs,Jobs[status], "Cancelled"), "Cancelled", if(CONTAINS(Jobs, Jobs[status], "Running"), "Running", "Completed") )

 

az38
Community Champion
Community Champion

Hi @Anonymous 

try a column

Overall = 
SWITCH(TRUE(),
CALCULATE(COUNTROWS(Table), Table[Status] = "Cancelled") > 0, "Cancelled",
CALCULATE(COUNTROWS(Table), Table[Status] = "running") > 0, "running",
"completed"
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

cureently i have data in status column like completed and cancelled for above logic i am getting two i need only cancelled

Hi @Anonymous ,

 

 

Assuming you have only these 3 status.

 

Try this measures

 

Measure 4 =

var a = SUMMARIZE('Table','Table'[Column2])
var b = COUNTrows(a)
var maxs = MAXX(a,'Table'[Column2])
var mins = MINX(a,'Table'[Column2])

Return

SWITCH(
TRUE(),
b=1 , maxs,
b=2 && maxs = "Completed" && mins = "Cancelled" , "Cancelled",
b=2 && maxs = "Running" && mins = "Completed", "Running",
b=2 && maxs = "Running" && mins = "Cancelled", "Cancelled",
"Cancelled"
)
 
Pull measure 4 on a card to get overall status.
 
 
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

harshnathani
Community Champion
Community Champion

@Anonymous ,

 

Please share sample data and a better description to your problem. 

 

Regards,

HN

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.