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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
BBlue20025
Frequent Visitor

Matrix - Can Primary Row Be It's Own Calculation From Sub-Rows?

Hello. I am new to PowerBI, so I apologize if this is not explained correctly.

 

I have a matrix where there are Primary Rows each with Sub Rows similar to a Region and all the Stores that exist in that Region.

My data exists at the Store level and then I built a relationship to show which Store is in which Region.

When looking at the Store rows, I get the expected values for a % calculation. But the % for the Region is an average of the Store % values or whichever is selected.

BBlue20025_1-1777481181732.png

So as an average I get the following:

BBlue20025_0-1777479740734.png

If I go back to the original data and pivot the Store data by their Region and do the same calculation, I would not get the same value as the average.

Is there a way to get the Region's % to be its own calculation?

 

Thank you for your help.

1 ACCEPTED SOLUTION

Hi @BBlue20025 

 

The Customize totals option works when the visual contains aggregated fields, measures, or visual calculations.

vveshwaramsft_1-1778651788864.png

 

To access it, you can:

->Right click on the column that contains the Total value and select New visual calculation -> Custom
-> Or right click directly on the total cell value in the column to configure Customize totals from there.

 

You can also access the same option from the Build section by clicking the dropdown next to the measure or aggregation used in the table visual.

 

This feature was introduced starting from the March Desktop release. So if you are using an older version of Power BI Desktop, please update to the latest version to access this functionality.

 

For Reference;

Power BI March 2026 Feature Summary - Microsoft Fabric Community

Create and Format Table Visualizations in Power BI - Power BI | Microsoft Learn

 

Hope this helps. Please reach out for further assistance.
Thank you.

View solution in original post

14 REPLIES 14
v-veshwara-msft
Community Support
Community Support

Hi @BBlue20025 ,

We wanted to kindly follow up regarding your query. If you need any further assistance, please reach out.
Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @BBlue20025 ,


Thanks for reaching out to Microsoft fabric Community.

Just checking in to see if your query is resolved and if any responses were helpful.
Otherwise, feel free to reach out for further assistance.

Thank you.

danextian
Super User
Super User

Hi @BBlue20025 

You can show a different aggregation for the subtotals directly from the customize total options.

danextian_0-1777600392134.png

danextian_1-1777600408557.png

Or create a measure that iterates over a table or table expression

danextian_2-1777600566650.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi danextian,

 

How come I do not have that Customize option?

 

BBlue20025_1-1778509248363.png

 

 

Hi @BBlue20025 

 

The Customize totals option works when the visual contains aggregated fields, measures, or visual calculations.

vveshwaramsft_1-1778651788864.png

 

To access it, you can:

->Right click on the column that contains the Total value and select New visual calculation -> Custom
-> Or right click directly on the total cell value in the column to configure Customize totals from there.

 

You can also access the same option from the Build section by clicking the dropdown next to the measure or aggregation used in the table visual.

 

This feature was introduced starting from the March Desktop release. So if you are using an older version of Power BI Desktop, please update to the latest version to access this functionality.

 

For Reference;

Power BI March 2026 Feature Summary - Microsoft Fabric Community

Create and Format Table Visualizations in Power BI - Power BI | Microsoft Learn

 

Hope this helps. Please reach out for further assistance.
Thank you.

Hi @BBlue20025 ,

Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.
Thank you.

danextian
Super User
Super User

Are you trying to select Store A or Store B in the same visual and pass that value from that row to Region calculation? If so, that isn't possible.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I'm not sure if this helps, but in PowerBI, Region A is -17% as the average of the Store's % and I wanted it to show -15% as this calculation.

IMG_5889.jpeg

Juan-Power-bi
Super User
Super User

The issue is that when Power BI rolls up to the Region level, it's averaging the store percentages instead of recalculating the % from the underlying data. You want it to recalculate from scratch at every level.
The fix is to make your measure always divide the totals directly rather than aggregating the child percentages. Something like:
daxStore % =
DIVIDE(
SUM('Sales'[YourNumerator]),
SUM('Sales'[YourDenominator])
)
When this measure runs at the Region level, Power BI automatically sums all the stores in that region before dividing

I'm not too familiar with how to use dax yet.

 

In the original data, I have columns by Store and Month.

I created a column that was the average for the 3 oldest columns:

= Table.AddColumn(#"Reordered Columns", "JFM_AVG", each List.Average(List.RemoveNulls({[January], [February], [March]})))

Followed by a column to get the % comparison of the newest month compared to the AVG of the previous three months

= Table.AddColumn(#"Added Custom", "PERC", each (([April]/[JFM_AVG)-1))

And then a column to look up the Region based on the Store

LOOKUPVALUE('Region'[Region],'Region'[Store],'Store'[Store])

BBlue20025_1-1777488136043.png

How would I use the dax example? Where do I type it?

Hi,

Please share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Unfortunately I cannot share the true data.

You can share anonymised data.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I'm not sure how to modify it for that.

Does this image help explain? I currently get -17% in my Primary Row as the average of the Secondary Rows, but I want it to calculate as shown for -15%.

BBlue20025_0-1777591304605.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors