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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Proper row calculation (trying to fix issue coming from source ERP data)

Hello Community:   

 

Occassionaly, our ERP system will break down a shipped line into multiple rows.  In this case, this order had 21 lines, and for whatever reason,  Line 20 got broken down into multiple rows  (the parent row you cannot see says Line 20).   All of the ship dates are the same, but I suspect at different hours:minutes (which we don't use in our Power Bi reporting). 

 

In Power Bi, this Order, on this particular ship date, will show 6 lines....when it should only show 1  (Line 20).   

 

I've tried countrows, countdistinct, etc and none of them end up working correctly in one way or another.   This does not happen on most orders, but it happens on some and it throws my total line count of shipped orders off because it adds lines where it shouldn't and what I really need is for Line 20 to be properly summed up  (inclusive of all the qty shipped). 

 

I beleive the issue needs to fixed at the source, or perhaps in the dataflow, but I am curious if there is a formulaic way to correct this  ( I do not control the source data or the dataflow).    

 

 

multiple lines.png

1 REPLY 1
ebeery
Solution Sage
Solution Sage

Hi @Anonymous, why not just use a "group by" step in Power Query?

https://docs.microsoft.com/en-us/power-query/group-by 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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