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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

PBI is grouping by NAME and not by ID

Hi guys,

I have this situation in PBI, I hope you can help.

 

I have my table visual to make sure everything looks like in the data source.
Right now, I have selected only the product "Chocolate con Almendras" (Almond chocolate ice cream).

As you can see in the table, there are 5 "Chocolate con almendras" products but this is because
the 5 of them are different products which come in different presentations (presentacion), and
have unique unit prices (PU Novo Foods) and production costs (Costo U Baccio). Therefore, in the data source,
I have given a unique ID for each of them, however, when I want to separately visualize the unit costs(PU NOVO FOODS) against the production costs (COSTO U BACCIO) (which is the dark blue line) of each of them, Power BI is grouping the product by name and not by a unique ID, and the result is that PBI is summing up all the unit prices/production costs and showing me that there's only 1 product with that name even though they have unique IDs. Here's the image:

 

SharedScreenshot.jpg

 

So, how I can sort them by ID?

 

 

Thanks all.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

You need to create a unique product field to use as your chart axis.

The easiest way to do this is in Power Query, select your [Producto] column, then Ctrl + click your [Presentacion] column so they are both highlighted, then on the ribbon go to the Add Column tab, then select Merge. This will create a new column with unique product descriptions to be used in your visuals.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

You need to create a unique product field to use as your chart axis.

The easiest way to do this is in Power Query, select your [Producto] column, then Ctrl + click your [Presentacion] column so they are both highlighted, then on the ribbon go to the Add Column tab, then select Merge. This will create a new column with unique product descriptions to be used in your visuals.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Thank you for your answer.

So, I will be creating a new column with no repeated names, right?

I have merged my PRODUCT column with the ID_presentation column, as the PRESENTATION value is stored in another query (cause I'm just trying to relate IDs). 

 Like in the following image:SharedScreenshot2.jpg

 

 

So, now I have the thing that the new column added an extra number to my products (as highlighted in yellow in the image above). If I remove them, would I be getting the same situation as the previous one?

 

Thanks in advance.

 

@Anonymous 

 

If you use your [PRODUCTO BUENO] field as your chart axis you will show separate totals for each type of Chocolate Ice Cream etc.

And yes, if you remove the [ID_Presentacion] numbers from this field, your chart will group all your Chocolate Ice Cream types into a single total again.

 

My recommendation for best presentation would be to merge your main table with the table that holds the presentation descriptions on [ID_presentacion], then do the column merge on [Producto] and [Presentacion]. This will give you items on your axis like:

Choc ice cream 250ml

Choc ice cream 125ml etc.

rather than:

Choc ice cream 34

Choc ice cream 17 etc. which is what you have now.

 

Hope this makes sense.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




mahoneypat
Microsoft Employee
Microsoft Employee

Have you tried also adding your ID_Producto column to the x-axis of your visual?  Once you do that, you can expand to next level of the hierarchy in upper right of the visual to show both the group and ID info.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.