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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ToreT
New Member

Calculation of Totals in matrix visuals

Hello!

 

I have a problem with calculating totals in matrix visuals and did not find this anywhere else. I have 2 measures that contain data per incident year and development month. By nature, this means that there is a different amount of months filled with numbers per year, so the rest is left blank. I want to calculate the difference between these measures in one specific row (the last filled one) and created a flag for this. Then I calculated the difference times the flag and get correct results in my new column "Diff at last period". To visualize my results I would want to see totals of my new column, but the total is blank or zero, dependent on how I fill the rows I dont need. Here is a screenshot with dummy data. 

ToreT_0-1745395994216.png

What am I missing? Thank you for your help! 🙂

 

Tore

2 REPLIES 2
ToreT
New Member

Hi, thank you for your answer @BITomS ! 

Unfortunately, this does not work because my matrix visual is set up on measures, not on tables.... Maybe, I have to create new measures completely, but I hope that there is an easier way, since "only" the totals are missing

BITomS
Responsive Resident
Responsive Resident

Hi @ToreT 

 

I think you need to aggregate only where the flag = true. This may help:

 

Diff at last period (Total Fix) :=
SUMX(
FILTER(
ADDCOLUMNS(
'YourTable',
"Flag", [YourFlagMeasure],
"Diff", [YourDiffMeasure]
),
[Flag] = 1
),
[Diff]
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors
Top Kudoed Authors