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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Mikerdata3000
Regular Visitor

stacked bar chart to Not use aggregate, I want it to "stack" values

Hi, I'm new to PowerBI. I want to see the stack of each car's miles but the visual requiring an Aggregates is confusing me. Choosing count is the closest I can get. I'd like to see the values stacked for each Buick Lucerne car, not the count of 4 Buick Lucernes or not the maximum miles out of the 4 Buick Lucernes in 2011.

1. Is there a visual that will allow this, lines to separate the blue bar of Buicks?

2. Why is there a green check mark next to Show as Value and a green check mark next to Maximum? (I thought this would be my solution)

3. Why only aggregates?

 

I'm expecting I need to make a new table and add to my model. Or I'm expecting that there is a visual and a way to specify X, Y.

4 screen shots.

powerbi_stackedbar.jpgpowerbi_stackedbar2.jpgpowerbi_stackedbar3.jpg

powerbi_stackedbar4.jpg

price,year,car,miles,model,engine,manual,title,notes,more1

3700,2007,Buick Lucerne,87000,CX,3.8L,,,brown
4200,2008,Buick Lucerne,87000,CXS,v8 4.6L,,,red
4500,2011,Buick Lucerne,110000,,,,rebuilt,white
5800,2009,Buick Lucerne,68000,CXL,v6,,,white
5300,2009,Buick Lucerne,98100,CXL,v6,,,silver
6400,2011,Buick Lucerne,56000,,,,rebuilt,silver
6500,2011,Buick Lucerne,93000,CXL,3.9L,,,red or silver
6500,2008,Buick Lucerne,58000,CXL,,,,light brown
6800,2011,Buick Lucerne,61000,,3.9L,,,heated and cooled seats
6900,2015,Chevrolet Malibu,80000,LT,2.5L,,rebuilt,backup camera
7200,2015,Chevrolet Malibu,80000,,,,rebuilt,black
4900,2010,Nissan Maxima,80000,S,,,rebuilt,maroon
5900,2011,Nissan Maxima,89000,,v6,,rebuilt,dark gray

thank you

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Mikerdata3000 ,

 

This has to do with data granularity you are making your chart based on the cartype the cartype only see the Buick Lucern, you need to had to your table the ID of the cars and not the model. don't know if you have any ID column but you can add an index column or something similar.

 

Second question you are talking about two different aspects of the calculations the first green check is regarding the aggregation you want to do (sum, count, and so on) the second part is to have the calculation based on value you selected previously or do you want to have a weight of the value (based on the previous calculation) so if you tick the second green mark has percentage of grand total you will get the weight of each one.

 

Finally you are talking about a chart so you cannot have values that aren't aggregations becuase of the context altough if you select the correct level of granularity (Column series part) the sum is equal to no aggregation.

 

So summarizing everything if you add your car ID to your Column series part you will get the correct granularity, and the 4 different models.

 

I have added an index to the table alonside with the description has you can see the chart show all 4 cars of the buick lucerne:

MFelix_0-1619088902947.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
Mikerdata3000
Regular Visitor

Thank you. yes, I have transformed the data using an index. Your solution answers the question. I like this topic, because it deals with modeling. Perhaps there is now a measure I can apply to get grouping colored by some scale or auto factor a color gradient for each Buick Lucerne (blue to dark blue), orange to dark orang for Impala. Yes, sum total worked. There are 91 cars in my new index, but only 32 car types.  I do also have an index for the 32 car table. Thank you.

power_bi_stacked_grouping.jpg

MFelix
Super User
Super User

Hi @Mikerdata3000 ,

 

This has to do with data granularity you are making your chart based on the cartype the cartype only see the Buick Lucern, you need to had to your table the ID of the cars and not the model. don't know if you have any ID column but you can add an index column or something similar.

 

Second question you are talking about two different aspects of the calculations the first green check is regarding the aggregation you want to do (sum, count, and so on) the second part is to have the calculation based on value you selected previously or do you want to have a weight of the value (based on the previous calculation) so if you tick the second green mark has percentage of grand total you will get the weight of each one.

 

Finally you are talking about a chart so you cannot have values that aren't aggregations becuase of the context altough if you select the correct level of granularity (Column series part) the sum is equal to no aggregation.

 

So summarizing everything if you add your car ID to your Column series part you will get the correct granularity, and the 4 different models.

 

I have added an index to the table alonside with the description has you can see the chart show all 4 cars of the buick lucerne:

MFelix_0-1619088902947.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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