Hi All,
I have a Name, Task and Status column.
I would like to create a overall status column which compares against "Name" column and tells the overall status. If all the task is completed against that particular person then overall Status is Completed. But Even if one work item is pending then overall Status have to be Pending.
For Eg. Prakash have one Pending work item so overall status will be Pending.
Ramesh have all the task as completed so Overall status will be completed.
Please let me know how to create a calculated column for this scenario.
Thank you in Advance
Regards,
Prakash M
Solved! Go to Solution.
Hey @mpraka ,
the following approach should work as calcualted column:
Overall Status =
-- save name of current row
VAR vNameCurrentRow = myTable[Name]
-- Count how many rows for the current user have the status "Pending"
VAR vNumberPending =
COUNTROWS (
FILTER (
ALL ( myTable ),
myTable[Name] = vNameCurrentRow
&& myTable[Status] = "Pending"
)
)
-- If at least one has status pending return "Pending", otherwise "Complete"
VAR vResult = IF ( vNumberPending > 0, "Pending", "Complete" )
RETURN
vResult
Next time please post the data as table and not as picture, that makes it easier when someone wants to recreate your situation and can just copy the values.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Hey @mpraka ,
the following approach should work as calcualted column:
Overall Status =
-- save name of current row
VAR vNameCurrentRow = myTable[Name]
-- Count how many rows for the current user have the status "Pending"
VAR vNumberPending =
COUNTROWS (
FILTER (
ALL ( myTable ),
myTable[Name] = vNameCurrentRow
&& myTable[Status] = "Pending"
)
)
-- If at least one has status pending return "Pending", otherwise "Complete"
VAR vResult = IF ( vNumberPending > 0, "Pending", "Complete" )
RETURN
vResult
Next time please post the data as table and not as picture, that makes it easier when someone wants to recreate your situation and can just copy the values.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
209 | |
52 | |
43 | |
41 | |
39 |
User | Count |
---|---|
269 | |
210 | |
73 | |
70 | |
65 |