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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
alice25
Regular Visitor

Group by

Hi everyone,

I am struggling with grouping the below set of data:

 

1) Firstly, I want to group the highlited columns. My final result should be: one row with date and total amounts for both columns

 

alice25_0-1672242951875.png

2) Secondly, I need to group the backlog - need to receive the last value from the last row (31143).

Does anyone know how to solve this?

Thank you!

 

 

1 ACCEPTED SOLUTION

Hi @alice25 

 

Here you go:

 

AnkitKukreja_0-1672248138935.png

 

Attaching the file for your reference.

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

View solution in original post

5 REPLIES 5
AnkitKukreja
Super User
Super User

Hi @alice25 

 

It would be great if you can share the sample data with me and the expected output.

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Hi Ankit,

 

Sample data:

Last date of the weekIncomingShipmentBacklog
12/25/2201291.0325237
12/25/220025237
12/25/22nullnullnull
12/25/220025237
12/25/22014573.5326528
12/25/220031143

 

Expected:

Last date of the weekIncomingShipmentBacklog
12/25/22015864.5631143

 

Thank you!

Hi @alice25 

 

Here you go:

 

AnkitKukreja_0-1672248138935.png

 

Attaching the file for your reference.

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Hi Ankit,

 

Thanks! There is one issue with backlog value - it will not be always max value.

 

Please find below the example:

Last date of the weekIncomingShipmentBacklog
12/18/225036.31031782
12/18/220031143
12/18/2201988.0231143
12/18/220026746
12/18/220026746

 

Expected:

Last date of the weekIncomingShipmentBacklog
12/18/225036.311988.0226746

 

Hi @alice25 

 

Not possible with group by as we can choose either max, min, sum, avg, count etc with the group by.

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors