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
PBI_JG
New Member

Cumulative avarage in Line Chart

I want a line chart with 3 different lines as values.

The first lane is the total revenue for a specific month.

The second line is a KPI for the revenues.

The last line should be a cumulative average which is a combined average for the selected months.

 

I use this formula but unfortunately it doesnt work:

CALCULATE([XXXXXX],FILTER(ALLSELECTED(Dim_Calendar),[Date] <= max(Dim_Calendar[Date])))
 
I get the values cumulated but it aint a cumulative average. 
 
PBI_JG_0-1709022407948.png

 

I thought that the second dot of the light blue line would be in between the first and second dot of the dark blue line.
 
What am I doing wrong?
 
 

 

5 REPLIES 5
Adescrit
Impactful Individual
Impactful Individual

The first argument of your CALCULATE function should specify an AVERAGE function.

So the DAX in a measure would be as follows. Change the word "Table" to the name of the table that contains your omzet column. 

CALCULATE(AVERAGE( 'Table'[Omzet] ),FILTER(ALLSELECTED(Dim_Calendar),Dim_Calendar[Month] <= max(Dim_Calendar[Month])))

 


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

I think this is close to the solution but it is not there yet.

I get cumulated averages but I believe that the averages are for single rows while I want them as a sum for that entire month.

PBI_JG_0-1709023770980.png

Light blue is now approx € 100 while dark blue is still €250K

Adescrit
Impactful Individual
Impactful Individual

Yes you are right - my mistake. 

Please try this:

 

Monthly Average YTD =
AVERAGEX (
    VALUES ( 'Calendar'[Month Number] ),
    CALCULATE (
        SUM ( Sales[Omzatz] ),
        FILTER (
            ALLSELECTED ( 'Calendar' ),
            'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
        )
    )
)

 


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

Do you maybe have a solution for the final part of the equation?

To get it cumulated within the linechart with the months on the X-line

I think u are at the point where I ended as well hahaha.

 

PBI_JG_0-1709030407947.png

Now the revenues per month and the cumulative revenues are the same.

That is because the months are part of the line chart.

 

If I change the visual to a able and remove the months the values do change but I want to monitor progress during the year within the separate months.

 

Another shot maybe (A)? 

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.