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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
lavanyak
Advocate I
Advocate I

table.group

Hello,

I am facing issues with Power query Table.Group.

I am trying to get the sum of sales for each sector.In total I have 1700 sectors (OnD)), but I am getting results only for 358 sectors.I am not understanding where im going wrong.

 

Below is the query I used.

= Table.Group(tb_SalesData,"OnD",{{"TotalGMV", each List.Sum([TotalGMV])},{"TotalDisocunt", each List.Sum([TotalDiscount])}})

 

Below is teh sample output. 

OnDTotalGMV
ABT-CAI1766
ABT-CGK4798
ABT-COK2297
ABT-DAC3639
ABT-DMM10753.05
ABT-ISB1450
ABT-IST3029.999
ABT-JED9860.9

 

any help is much appreciated.Thanks in advence

Regards

Lavanya

4 REPLIES 4
Gazzer
Resolver II
Resolver II

Can you clarify - do you have 1,700 unique sectors? Or does your table have 1,700 rows of data, with 358 unique values?

 

Sorry if this seems like a patronising question, I just can't think of another way to explain it, based on such a small sample of data.

My data is at booking date level and has in total 26000 records, in which I have 1700 unique sectors.

I am trying to get the sum of sales for each of these 1700 sectors by grouping at sector level. Ideally in the result I should get 1700 rows but I am getting the results only for 358 sectors.

 

The data I gave is the sample of the results.

 

Hope it is clear now.

Hi @lavanyak

 

Unfortunately, without seeing the actual data it is not possible to say why you are getting fewer unique values than you expect. All I can really suggest right now is to double-check that you are grouping by the right columns. Perhaps take the data into Excel and do some counts in there?

 

Sorry - I realize this is not particularly helpful!

Thanks for your response.

 

I crossed checked the data, using the same table if I group sales by sector in Power bi desktop visualization, I am getting total sales for all 1700 sectors.

 

I dont understand why I am not getting it in power query.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.