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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

How to aggregate some columns based on values in other columns

I'm still pretty new to Power BI so apologies if this is super basic. I've got a table with data like this:

Project IDTask IDDate
12314/1/22
12356/1/22
123297/1/22

 

I'm trying to show in Power BI a table that looks like this:

ProjectTask 1Go Lives
1234/1/227/1/22

 

In other words, for each project show the latest date associated with Task 1 and the latest date associated with any go live task. The go live tasks have predefined IDs. I've been using a Matrix visualization, and I can pivot the task IDs I want with the "show values as column headers" option. But I'm not sure how to write the DAX I presume I'd need to create a new "Go Lives" column with the latest associated date for the given tasks.

 

Thanks!

1 ACCEPTED SOLUTION

@Anonymous 
But I'm a little bit confused whay you want to use a matrix visual. As in this case you would need a table visual. Then you can use

Task 1 Date =
MINX ( FILTER ( TableName, TableName[Task ID] = 1 ), TableName[Date] )
Go Live Date =
MAXX (
    FILTER ( TableName, TableName[Task ID] IN { 29, 30, 31 } ),
    TableName[Date]
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Anonymous 
Do you have a list of the go live task id's in a seperate table or you would like to hard code these id's?

Anonymous
Not applicable

Hi @tamerj1 , I can just hardcode them. There are only a handful.

@Anonymous 
But I'm a little bit confused whay you want to use a matrix visual. As in this case you would need a table visual. Then you can use

Task 1 Date =
MINX ( FILTER ( TableName, TableName[Task ID] = 1 ), TableName[Date] )
Go Live Date =
MAXX (
    FILTER ( TableName, TableName[Task ID] IN { 29, 30, 31 } ),
    TableName[Date]
)
Anonymous
Not applicable

Ahh, thanks! I had thought that to pivot it I needed to use a matrix but this seems easier. I'll give it a try in a bit.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.