Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |