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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper III
Helper III

percent of grand total of a Matrix, as another value in the leyend of a line chart

Hello guys,


I have wrote a measure that calculates the sum of sales in the values area of a matriz but the average in the grand totals, the matrix looks like this:


 I would like to show a line chart with years on the leyend, and also another line for the average (which is the value that the grand totals show if I use a Matrix). It would be something like this:



The only thing missing in that chart is another line for the running average (which is the value of the grand total of the measure). I hope you can understand what I mean. Is that something possible to achieve?


Thank you very much,



Super User
Super User

What you probably need to do is to create a new measure that uses an ALLEXCEPT filter. Like:


m_MyMeasure = CALCULATE(SUM(Table[Column]),ALLEXCEPT(Table,Table[Mes]))

That's essentially what is going on in the totals row. 

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...



Thanks for your answer, but I think I didn't explain myself correctly. What I am trying to do is to replicate and understand this blog post by Javier Guillen:


In the final part of the post you can see what I want. I am sure you will understand my problem better.


Thank you very much.

Hi @ContabilidadBI,


From the link you provided, it suggest generate a running average via dividing running total by year count. Have you tried that? Does it work in your scenario?



Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yuliana thanks for your answer,


Yes I did it and I can have a matrix with the running average in the grand totals, what I would like to do is to represent the sales of each year and the average sales in the same line chart, just like he does at the very end of the post.


I can't achieve that because if I put Calendar[year] in the leyend of the line chart, I have only a line for each year, but I don`t have the grand total (which is the actual running average).



Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.