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
aflintdepm
Helper III
Helper III

DAX Formula to "Collect" multiple Rows

I'm trying to collect or summarize the status of tasks based on a person, but each task is a separate row.

 

Here is an example of data:

NameTask NameStatus
Bob SmithTask 1Completed
Bob SmithTask 2Pending
Jane DoeTask 1Pending
John JonesTask 1Completed
John JonesTask 2Completed

 

What I would like is a formula that says - For [Name], if any Task is Pending, then "Task Name", otherwise "Complete"

 

So, my desired results would look like this:

 

Bob Smith | "Task 2"

Jane Doe | "Task 1"

John Jones | "Complete"

 

Any examples or tutorial references would be appreciated.

2 REPLIES 2
Ahmedx
Super User
Super User

pls try this


Screen Capture #1192.png

 

Measure 1 =
COALESCE(
CALCULATE(MAX('Table'[Task Name]), 
CONTAINSSTRING("Pending",'Table'[Status])),"Completed")

------- or-----------
Measure 2 = 
CALCULATE(SELECTEDVALUE('Table'[TaskName],"Completed"),
             CONTAINSSTRING("Pending",'Table'[Status]))

 

 

Ashish_Mathur
Super User
Super User

Hi,

This measure works

Measure = COALESCE(minx(FILTER(SUMMARIZE(VALUES(Data[Task Name]),Data[Task Name],"ABCD",MAX(Data[Status])),[ABCD]="Pending"),Data[Task Name]),"Complete")

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.