Forum Discussion
Make a column not sum/count
I've used Power BI quite a bit lately with a SSAS cube and some Sql Server queries and created many visualiations. I am still fairly new to this though and cannot figure this out.
I imported a very simple Excel spreadsheet. 3 columns: period, actual, goal. I tried to make a line and stacked column chart. However, it keeps using the aggregations (that don't make sense). It is using a count of the goal and count of the actual and not the value from the spreadsheet.
When I go into the query, I see no place to change how/if a column is summarized. I know how to do this in PowerPivot.
Beyond that, I have no idea why it would do any aggregations since I am using all fields in the dataset and aggregation is not needed/appropriate.
When I click on the column under "Column values" it shows "Count of Actual" and the only options are "Remove Field", "Count (Distinct), and "Count". How do I kjust get the value?
47 Replies
- maraclesResolver II
michaeljc70 if I understand you correctly you have not created a measure, you are just dragging the columns to the visualisation.
Do avoid the aggregation happening:
1. Find the field in question in the Values field of the Visualisations Pane
2. Click the small arrow to the firght of the column name
3. Click 'Don't Summarise'
Picture below, hope that helps.- michaeljc70Advocate II
Thanks for the reply. But as I said, there is no option to not summarize it.
In doing some more research, I think the reason it is doing a count is because the column has "N/A" in some rows and it thinks it is a character field. I transformed it to get rid of the N/As and make the column a number. Now I see more options like Average, Minimum, etc. but no option not so summarize.
- michaeljc70Advocate II
I'll add when I put all 3 fields in a table, it looks right and there is no counts or aggregates.
- AnonymousNot applicable
Hello,
Thank you for the reponse - it makes a ton of sense. The issue I'm experiencing is there is "Don't Summarize" option.
The options listed are:
- Sum
- Average
- Minimum
- Maximum
- Count (Distinct)
- Count
- Standard Deviation
- Variance
- Median
Thoughts?
- smpdNew Member
You need to go back to the table/query click on the dots to the right and select edit query
When the data list is displayed, find the column that you want to sum. right click on the column title to select the column and display the menu, then select "change type" and select the appropriate type such as "decimal number"
Click the "Close and Apply" button to update the query.
Now when you click on the field in the "Values" section you should have all the options
- ssaurabhdhingraNew Member
Hello,
I am new to Power BI, so need expert help with the same issue. Earlier I was seeing only Count option, but after following your suggestion, I could see all other options except "Don't Summarize" like Sum, Average, Median etc.
I tried different data types like Decimal, Whole Number, Text and Duration but with no luck.
Could you please help me in finding the "Don't Summarize" option.
Thanks in advance
- LorputNew Member
I am also new to Power BI and am having the same issue with a scatterchart. I have cost on one axis and usage on the other, and it insists on somehow summing my data. How can I get to show me the proper range of data?
- afetchkoNew MemberThis is the answer that fixed the problem for me. There should be a way to mark this as the correct or most accepted answer the way that StackOverflow has it. Thanks!
- RBiltonNew Member
This helped on some columns that were marked number and when I switched t it to text, it removed the sum. Thanks. However not working on all of my columns.
- uday64657New Member
Any solution for this Problem.
I am also facing same issue. In Power BI desktop, I can able to see column with Sum that allowing to show actual count in Graph. However when I publish same to Power BI Online, it broken and showing count of the column.
- v-esdevMicrosoft Employee
Hi All,
I am also facing same issue. does anyone find solution for this.
Please help me on this.
Thanks,
Eswar
- AWeichselbaumAdvocate I
I just figured this out.
Under Fields, click on the field which is being auto-summarized. Once selected, go to the top ribbon and click "modeling". You will then see a button called "Default Summarization..." click this, and select 'do not summarize'. Above that button you can also change what the data is - this is useful for telling Power BI that the data is a postal zip code, for instance.
- natabird3Skilled Sharer
Make sure to change the column to decimal format then you will be able to change to don't sum.
- leonardmurphySkilled Sharer
Most visuals in Power BI expect an aggregated value in the "Values" section of the chart. The exception (I know of) is the table visual.
For that reason, if you put a column into the "Values" section of a chart, Power BI will select an aggregation for you. You can change that aggregation (sum, average, count, min, max, etc) but you cannot select "Do Not Summarize".
If you think about it, this does make sense. Take, for example, a column chart. If you have "Month" on the axis and then you put "Sales" as the value, what do you expect Power BI to do when there is more than one sale in a given month? It needs to know if it should sum, average, count, etc. Even if you know there's only one data point per month, Power BI doesn't know that will always be true.
There are a few ways around this. If you want to break your column chart down to have a single column for every sales record, then you need sales record ID (or another attribute that's unique for every record) on your axis. If, as in the case of the original poster, you want to break down your actual & goal by period, then period needs to be on the axis.
If you know that you have only 1 value per period (say), then using an aggregation such as average or sum shouldn't matter because an average/sum of a single value is that value (as long as you're breaking down your chart by period).
For a scatter chart, the same principals apply but in this case, there is no axis. Instead, you want to put the field you want to break your chart down by into the "Details" or "Legend" section.
In any of these cases, if you don't have a field to break your chart down to the level you want, you'll need to add one. This could be as simple as going to "Edit Query" and adding an Index column (though I'd recommend adding something that makes sense to your problem domain).
Should Power BI have a concept of "row" when displaying data, so you can de-aggregate data to the lowest level without having to manually add your own column? I personally don't think so. Power BI is designed as an interactive data analysis tool. For that reason, charts need to provide context (such as what a column represents). Even if each row represents a single customer or a single month, it makes more sense to provide the customer ID or month name in your chart, than for Power BI to use a meaningless row number. In my opinion, it's good that Power BI puts the onus on you to add that context as a column to your data.
---
Bear in mind, with some of my de-aggregating suggestions, that if you're working with large datasets, Power BI isn't going to perform all that great. Power BI excels at aggregation. A column chart with 10,000 columns is going to be pretty unusable. A scatter chart with 100,000 data points might not perform as well as a traditional graphing tool. It may be worth exploring other tools if that's your end goal (R, Excel, the Sand Dance custom visual).
As other posters have mentioned, data types are important. If your column is numeric, Power BI is generally going to assume that it's a "value" and try to aggregate it. For something like "Period", where you don't want to aggregate it, you will have to deliberately move the column to the axis part of the visual. This also applies in reverse. If your "Goal" is a text field, then Power BI has limited options for aggregation (it can do a first/last/count, but it cannot sum or average a text field).
Overall, I recommend using measures that explicitly sum/average/count things, rather than dragging columns onto visuals and choosing the aggregation on each visual. Reasons: (1) Having a measure for Customer Count saves you from constantly having to take CustomerID and change a sum to a count. (2) It reduces the risk that someone sums a column and thinks it is a count (sometimes it is obvious, but not always). (3) If you later want to redefine who counts as a customer, you can update the measure and all visuals will adjust automatically.
For attributes you would only ever want to use on your axis/legend, I recommend setting the default aggregation in the modeling tab of the data window to "Do Not Summarize" as AWeichselbaum mentioned above. This is indeed useful if you have a ZIP column and you know you never want to sum 2 zip codes together, and want to be able to select Zip Code without it aggregating.
---
Hope this helps as a summary of what might be going on when you find yourself unable to de-aggregate a column. If you're still stuck, I recommend posting a new thread with exactly what you're trying to accomplish (and what isn't working) rather than continuing to ask in this thread.
- born2seeNew Member
Another unfortunate soul who can't get rid of the Sum of my data. Why does this program insist on summing these numbers??? My chart is so simple. A date field and a value field. I just want to plot them over time but this program inisists on summing my data. I've tried everything posted here and it just doesn't work.
Any thoughts before I go find some other program?
Thanks
- AnonymousNot applicable
So, I realized my error was caused by an incorrect data read in Power Query. I had input just the YEAR into a column which was being interpretted as a Whole Number rather than a Date. When I formatted my column to a DATE, I was able to filter by YEAR and that fixed the Sum Total problem.
I'd recommend taking a look at your data sets in Power Query, and making sure all your columns are formatted the way you need them to be - this will ensure it is reviewed properly.
- ChrisGraceRegular Visitor
I have been fighting this as well. It makes a difference which visualization you are adding the values to. I show the "Don't Summarize" option on the Table, but not the Line Chart.
Don't summarize in tablesNo choice in Line Chart
- RaneshNew Member
I've manged to get the SUM menu option to appear by simply formatting the columns in your orginal data file (i.e. excel or SQL) to be decimal format type. Once this is done, re import the data table to power BI and the SUM menu option should appear. Hope that helps.
- born2seeNew Member
Another unfortunate soul who can't get rid of the Sum of my data. Why does this program insist on summing these numbers??? My chart is so simple. A date field and a value field. I just want to plot them over time but this program inisists on summing my data. I've tried everything posted here and it just doesn't work.
Any thoughts before I go find some other program?
Thanks
- superuserNew Member
I found it here:
Under modelling tab, default summarization: Do not summarize
- superuserNew Member
Its under modelling tab, default summariation: Do Not Summarize.
- russellwsmithNew Member
I would also appreciate a solution to this. I'm just trying to plot a time series and it bins by day rather than showing multiple months at a time.
- leonardmurphySkilled Sharer
russellwsmith It'd be better to start a new thread with more information about what you are trying to accomplish & what you've tried so far. Your 2 sentences aren't enough to be able to do anything more than guess at what might be wrong.
If it's not a problem, but rather you think Power BI should work differently, submit an idea (or find an existing one to support).
---
Overall, I recommend starting a new thread rather than posting here because a new thread can be exclusively focused on what you're trying to accomplish, and once you've solved your problem, you can mark the thread as answered. By contrast, this thread is muddied by lots of people trying to do lots of different things, and the original poster has long since moved on. This isn't a problem for which one answer neatly applies to everyone; the answer really does depend on what you're trying to do, and why you're trying to do it.