Microsoft Power BI - Column Separator in Matrix Visual

Sometimes the most relevant way of data representation is just a table.. the least formatting we can do there is to format cells, columns headers, apply conditional formatting ideas like icons, data bars, heatmaps, etc

PowerBI doesn't allow column grouping by default as an OOB feature, although there's always a sneaky way out.

Let's say you have a table like below and you want to group/ apply a separator so that it logically groups the columns based on the subject KPIs.

Table

Say you want to group columns like Product Info [Product, Product Category], Sales [unit Sold, Total Sales], Coverage on Target [Gap to Target, %Covg on Target], and Product Discount [%Discount, Discount].

One way to do this is to apply the color codes to Column headers like below:

Aesthetically poor design

Imagine a page full of such colorful tables ?? to top it up use conditional formatting on columns to make it even more colorful.

Okay, Jokes apart!! So, to overcome this there's a simple trick to logically group columns is to use a separator - which is nothing but just a blank column added in the column sequence to visually break the column sequence and make it look like as-of the columns are grouped.

This separator is nothing but a blank measure that will not be affected by any filters or data within the table/ matrix visual.

Step 1. Create a Measure

Create a measure and name it as '.' - Yes it's just a dot (.); that's because we want to keep the measure name as short as possible because if your columns are enabled for word-wrap and you choose your separator to be very thin it will wrap the separator column name and your table view will be skewed.

Table view

Step 2.Initial measure formatting

Pull out this measure in your visual only once. Don't pull this measure at all places on your table visual for now. Now go to Field Formatting and select '.' column, choose font color and background color to any color that suits your background - (here I have selected my separator to be a plain white separator which matches my white background) and apply it to values as well as header.. settings as shown below:

Field formatting

Step 3. Apply the separator

Once the above settings are done, pull the same measure again at places where you want the separator to be in your table visual. The final result will look something like below.

Final result

Pro tip

In case you pull this measure on your visual and if the visual goes blank, go to the reference column which is an always-non-blank value column, and just do 'show items with no data'. Remember this helps only in this case where the visual has gone blank due to the column separator visual. If your visual already has a filter for non-blank on any other measure values, I suggest please be careful when you choose to 'show all items with no data'.