557 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
|Stop automatic grouping in Power BI Desktop|
|Read this blog to understand the risk of Power BI's automatic grouping of data, and to learn how to avoid getting caught out!|
For those new to aggregation in programmes other than Excel, it's worth noting what happens when using aggregates in visuals in Power BI. To demonstrate this, consider this table:
A simple table listing the number of products sold in each store.
Everything looks fine at first glance, although Arndale Centre looks a bit of an outlier. Maybe it is in London? Let's check the towns these centres belong to:
Uh oh! Turns out that there are several centres called Arndale Centre - Power BI has grouped the sales to centres of the same name.
You can see what's going on more clearly if you count how many times each Centre appears:
Each centre has its own row in the table, so we can check if the same name appears multiple times.
The easiest way to fix this problem is to use a unique identifier for each centre within the table visual to split up centres with the same name. We already have a unique column called CentreID:
Make sure to un-aggregate the column by choosing Don't Summarize, otherwise Power BI will try to SUM or COUNT it.
If you don't have a nice ready-made column to hand, not to fear. We can add one pretty easily in Query Editor. First click this button:
The Edit Queries button on the Home tab.
We could do a similar thing by using the RAND or RANDBETWEEN functions in a calculated column.
Select the table you want to add the new unique column to (for us it is the Centre table). Then choose Index Column from the Add Column tab:
It is never recommended to use From 0 unless you have a good reason to do so!
You can now use your new column to stop the aggregation of centres with the same name:
Remember to change the aggregation to Don't Summarize, or all your hard work will be for naught!
If you don't want to see the column simply drag the column width so small you can't see it, just like you would in Excel:
You will need to turn Word wrap off for both the Column headers and Values, or risk getting really long column headers!
25 Aytoun Street