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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
abrown
Regular Visitor

Power BI visualization issue

I am trying to do a bar chart showing the sum of defects for every week of the year. I already did the calculation in excel and successfully transferred the data table to power BI. Every week is showing only 1 defect. See pictures. 1.PNGCapture.PNG

10 REPLIES 10
AkhilAshok
Solution Sage
Solution Sage

Best practice is to always create a measure and use it in the Visual: Total Defects = SUM(Table[Defects])

 

If you directly use the column, then you have to be careful about the default summarization, which in your case seems to be count rather than sum.

How do I chart the values for defects without any count or sum?

I'm a bit confused by your question.  Are you saying you're happy with the answers given (i.e. use 'sum' to aggregate your defects on a chart either by visually changing the aggregation used, or by changing the default summarization for defects or by creating a measure to sum the defects and using that on a visualisation) but it's still not working for you or are you asking how to chart values without using any aggregation( no sum, no count, no average or anything like that)?

 

If it's the latter, then you set the 'default summarization' for your defects field to 'don't summarize' and drag the field on to a visualisation.  Be aware that Powerbi is all about aggregations and it might just default to count at this point anyway because otherwise it doesn't know what to display.

 

If i'm still not understanding your question, attach a picture of what you want and/or upload your pbix file and i'll take a look at it

I need Week # on the X axis. I want a bar chart showing the number of defects for each week, so no aggregation. Where might I change the default summarization?

Ok, it looks like your original question still stands and you haven't followed the previous answers given by myself  or the other dude.  So you are probably at the start of your powerbi journey.

 

For long term answers : read this https://docs.microsoft.com/en-us/power-bi/service-aggregates   i know it says powerbi service but it applies to desktop too

 

Short term : You think that you don't want to aggregate your number of defects but actually you do.  And you want to use SUM.  Go back to your visualisation , you have week# on the axis and Defects in values.  Go to the Values section, click on the small triangle next to Defects.  We think that a tick will show next to Count but you really want to tick Sum.  So tick Sum and your visualisation should show what you want.  If it doesn't, there may be an issue with the data type used for defects so attach your pbix and i'll look at it.

I have tried the previous replies.. Sum doesn't cut it either because it sums every defect and outputs the total # of defects for the year for every week number.

 Capture.PNG

I can't get the full situation from the picture you just posted because the visualisation wasn't selected at the time you took the screenshot. 

But it does look like you don't have the correct datatypes on your fields in the PER WEEK table.

Link your pbix and i'll look at it

 

Also "do not summarize" is not listed as an option. I updated the query to change the data type to text and the option was still not available. 

HotChilli
Super User
Super User

You are using COUNT to summarize your data so effectively for each week you are saying you have one record. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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