cancel
Showing results 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

## 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,

Víctor

4 REPLIES 4
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.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Helper III

Hi,

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: https://javierguillen.wordpress.com/2012/11/28/running-total-techniques-in-dax/

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.

Employee

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?

Regards,

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.
Helper III

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).

Thanks

Announcements

#### 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.

Top Solution Authors
Top Kudoed Authors