The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
What am I missing? Thank you for your help! 🙂
Tore
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
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]
)