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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

DAX Assistance with querying completed tasks over multiple rows

I have an issue where i have a table as follows: 

 

WorkerTask Flag 
A1

Complete

 
A2Complete 
A3Complete 
B1Incomplete 
B2Incomplete 
B3Complete 
C1Incomplete 
C2Incomplete 
C3Incomplete 

 

I want to display on my powerBI dashboard somehow that when "Worker" A has all tasks completed it is set as YES

However if a worker has even 1 task set as incomplete such as B and C for the query to show up as NO. 

 

I'm just a newbie trying to learn, tried to explain as well as i could. 

Thank you in advance for any assistance. 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

You can create a measure like this:-

 

all_task_completed =
VAR _count_task =
    CALCULATE (
        COUNT ( Task_details[Task ] ),
        Task_details[Worker] = MAX ( Task_details[Worker] )
    )
VAR _count_of_status =
    CALCULATE (
        COUNT ( Task_details[Flag] ),
        Task_details[Worker] = MAX ( Task_details[Worker] )
            && Task_details[Flag] = "Complete"
    )
RETURN
    IF ( _count_of_status = _count_task, "Yes", "No" )

 

Output:-

Samarth_18_0-1639585814627.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

2 REPLIES 2
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

You can create a measure like this:-

 

all_task_completed =
VAR _count_task =
    CALCULATE (
        COUNT ( Task_details[Task ] ),
        Task_details[Worker] = MAX ( Task_details[Worker] )
    )
VAR _count_of_status =
    CALCULATE (
        COUNT ( Task_details[Flag] ),
        Task_details[Worker] = MAX ( Task_details[Worker] )
            && Task_details[Flag] = "Complete"
    )
RETURN
    IF ( _count_of_status = _count_task, "Yes", "No" )

 

Output:-

Samarth_18_0-1639585814627.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Thank you for the solution 🙂

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.

Top Solution Authors