Power BI Blog: Leave a Line
22 July 2021
Welcome back to this week’s edition of the Power BI blog series. This week, we will look at how to leave a blank line in a Matrix visualisation.
Last week, I had a simple table of accounting data, which I created a Matrix for:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image1.png/e774d10cbbb9450fc45efbe51abdf434.jpg)
I used a measure which I called asterisk
* = “ “
to create a line in my Matrix.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image2.png/f32e5a15e2cf9c3e4d2d058458ce054d.jpg)
Today, I have imported rental data into a new table called Rent:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image3.png/f1140ff857fc3b6f5f97a6a24f4a6fc7.jpg)
I want to include a calculation based upon this data in the same Matrix I created last week. I have created a relationship between the Rent and Accounts tables:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image4.png/72aa864d2854c6fefb1083fba0ab5792.jpg)
In this very simple example, I can use a 1 to 1 relationship using the Month field.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image5.png/36776d1da4d05b45bb5a5d09375f407c.jpg)
I can create a new measure to work out the Net Rental Income:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image6.png/23912d3b1671861e02bebcd5183f1607.jpg)
Net Rental Income = CALCULATE(SUM(Rent[Rental Income]) – SUM(Rent[Overheads]))
This is very similar to the Profit measure I created last week. Now I can add Rental Income, Overheads and Net Rental Income to my Matrix. I include the asterisk measure before Net Rental Income to insert a line.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image7.png/6f49c288a0d88a66b427eaf4ece923d6.jpg)
There are a couple of changes I want to make to the formatting. Now I have more lines, I would prefer to see the line all the way across to the row names. I can do this in the Formatting pane in the ‘Field formatting’ section for the asterisk measure.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image8.png/b9ee28d90e6b5bc92ea4aeafdad51628.jpg)
If I toggle ‘Apply to header’ to On, then the line is extended for both occurrences of my asterisk measure:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image9.png/0485ccbc83bdeec1d741bad442a1ea5f.jpg)
This is looking better, but I’d like to leave a gap between Profit and Rental Income. I can do this by creating another measure:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image10.png/daf8c4f0259ce428269c0d3d4badd32b.jpg)
“” = “ “
I will refer to this as the blank measure. I add the blank measure to my Matrix.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image11.png/22c6daeb82d7d69ac88f878227e04b28.jpg)
I have a space, but it’s a bit thin. I can just add more blank measures until I am happy with the gap.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image12.png/a1537847463e660a31158c8032525438.jpg)
This gives me a gap I am happy with. For this Matrix, I want the font and background colour of the blank measure to be white, but this will depend upon the formatting chosen for each Matrix.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image13.png/917da985be13220165c8d2823e95344f.jpg)
I can now add a Total Net Income measure.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image14.png/8c3be7af9f73d031acae69ed85a2e148.jpg)
Total Net Income = [Profit] + [Net Rental Income]
I add this to my Matrix and format it with more asterisk and blank measures. I also alter the background in the ‘Field formatting’ section of the Formatting tab for each field to give my Matrix a more balanced appearance.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/pbi/182/image15.png/e63c0a4c21afc9afb438aacc09a59317.jpg)
Check back next week for more Power BI tips and tricks!