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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
s2888
Frequent Visitor

how to insert a calculated row into hierarchy matrix power bi

I already created a matrix virtual in power bi desktop. I want to insert some calculation rows (the calculation is between two categories in the hierarchy ). Is any way or feature of the power bi desktop can do? 

 

Thank you

6 REPLIES 6
s2888
Frequent Visitor

I got the solution by adding a new column on the data mode to reform a new category column.  In this new category, you add an item you want to be one of this category. Here is the screen shot.  Red circle is the item inserted into the heriachy category. 

 

s2888_0-1662671036757.png

 

Anonymous
Not applicable

HI @s2888,

In fact, you can't directly modify this visual to add new types. For this scenario, you need to create a parameter table with raw table categories and new values.
Then you can use it to replace the raw matrix field and write a measure formula to use on the matrix value field to lookup row table records and calculate based on current category values.

If you are confused about these operations and coding formulas, please share some dummy data to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Hello Xiaoxin

 

Thank you for the reply.  How to create a parameter table with raw table categories and new values? Do you have screenshots or links to show me?  Also, the rows matrix is a hierarchy(5 layers hierarchy), it comes from the same field. 

Shirley

  

Anonymous
Not applicable

HI @s2888,

You can extract the raw table category fields and use union with row functions to add custom records to the new table.

UNION function (DAX) - DAX | Microsoft Docs

ROW function (DAX) - DAX | Microsoft Docs
Regards,

Xiaoxin Sheng

Hariharan_R
Solution Sage
Solution Sage

Hi,

can you share some screenshot? if the categories are coming from one field then you can't insert between the category values

Thanks

Hari

Hello, Hari

Sorry for reply you late.  Here the screenshot shows what I want to do.  However, I cannot see any feature can do this in power bi desktop 

 

s2888_0-1655932038294.png

Thank you

Shirley

 

 

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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