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
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
Continued Contributor
Continued Contributor

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.

Top Solution Authors