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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
marc_frei
Helper I
Helper I

Group by Max

Hi,

 

My aim is to show only the Highest Phasen_ID by each Project. I tried Group by which i'm not succeeding to get working. Can anyone help me?

 

marc_frei_0-1645006527743.png

@Anonymous 

3 ACCEPTED SOLUTIONS
Anonymous
Not applicable

You are not grouping by ONLY the Phase _ID, though. Your code says you are grouping by several other columns as well, so your grouping will return the combination of unique values of the fields you selected to group.

 

If you have a list of the 12 months, with each month having 30 rows for the date. If you group by month ONLY, you will get 12 unique rows. If you group by month and date, you will get 30 groups for each month. If you need to have no duplicates, group ONLY on Phasen_ID, and add an "All Rows" aggregation. You can still do your List.Max as well. Any other values you might need are in the nested tables.

 

--Nate

View solution in original post

Anonymous
Not applicable

You would still Group by Project, and then choose the aggregation Max for the Phazen column. Use the Group By GUI dialog.

 

 

--Nate

View solution in original post

I could solve it with table.buffer, sort descending and then remove duplicates. 👍

View solution in original post

4 REPLIES 4
marc_frei
Helper I
Helper I

thanks for your response, I see the point.

 

marc_frei_0-1645015531341.png

 

 

But how can I achieve now, that it shows me only each Project with the highest Phasen ID? How can I access the table based on the highest Phasen_ID by Project Nr?

 

My target is to have the initial table, after the Pivot, but just showing the highest/max phasen_id.

Anonymous
Not applicable

You are not grouping by ONLY the Phase _ID, though. Your code says you are grouping by several other columns as well, so your grouping will return the combination of unique values of the fields you selected to group.

 

If you have a list of the 12 months, with each month having 30 rows for the date. If you group by month ONLY, you will get 12 unique rows. If you group by month and date, you will get 30 groups for each month. If you need to have no duplicates, group ONLY on Phasen_ID, and add an "All Rows" aggregation. You can still do your List.Max as well. Any other values you might need are in the nested tables.

 

--Nate

I could solve it with table.buffer, sort descending and then remove duplicates. 👍

Anonymous
Not applicable

You would still Group by Project, and then choose the aggregation Max for the Phazen column. Use the Group By GUI dialog.

 

 

--Nate

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.