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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Gonqq
Helper I
Helper I

% of Grand Total

Hi,

 

I have this matrix with the following measures:

 

Gonqq_0-1640868258270.png

 

 

[Real 1]:

Real 1 =
var Y = SELECTEDVALUE('Calendário'[Ano])
var M = SELECTEDVALUE('Calendário'[Mês_ID])
VAR RY = CALCULATE( SUM('BALANCETES'[Valor]), 'Calendário'[Data] = DATE(Y, M, 1))

return RY

%GT Real 1 is:

Gonqq_1-1640867376966.png

 

And i'm having some trouble replicating it. I want it to be a measure to i can use for other calculations. I tried with these measures:

 
TESTE 3 = CALCULATE(SUM(BALANCETES[Valor]), ALLSELECTED('Áreas'[Área]))
 
% Total teste = DIVIDE('Cálculos Matriz DR'[Real 1],[TESTE 3],0 )
 

It works but when i drill down the matrix it isn't correct:

Gonqq_2-1640868350911.png

 


Basically what im trying to achieve is that [TESTE 3] is 12293740.57 in every single line.

 

Thank you in advance

 

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Gonqq,

According to the description, it seems like a common measure total level calculation requirement. If that is the case, you can take a look at Greg's blog about handle measure total level calculations:

Measure Totals, The Final Word 

If the above does not help, can you please share more detailed information to help us clarify your scenario to test?

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
MFelix
Super User
Super User

Hi @Gonqq ,

 

Without any further background or data is difficult to give you a correct answer but to have the calculation done has you need I believe you are missing one level of the aggregation on your formula, You need to place also the second level of your matrix in the measure, not only the top one.

 

Has you show on the image all the lines of totals are giving you the same value that means that the aggreegation is working properly, but when you go to the second level that is not true because your aggregation is only at first level.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.