The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have an issue where i have a table as follows:
Worker | Task | Flag | |
A | 1 | Complete | |
A | 2 | Complete | |
A | 3 | Complete | |
B | 1 | Incomplete | |
B | 2 | Incomplete | |
B | 3 | Complete | |
C | 1 | Incomplete | |
C | 2 | Incomplete | |
C | 3 | Incomplete |
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.
Solved! Go to Solution.
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:-
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
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:-
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
Thank you for the solution 🙂