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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Bessonnizza
Helper II
Helper II

Calculate cumulative total of average

Hello there, 

 

I have a measure which calculate  cumulative total of opened tickets:

_opened / cumulative total / dynamic =
VAR check_date =
    SELECTEDVALUE ( 'calendar'[data] )
RETURN
    CALCULATE (
        SUMX (
            'tickets_created',
            IF (
                'tickets_created'[create_date] <= check_date
                    && 'tickets_created'[close_date] >= check_date,
                1
            )
        ),
        FILTER ( ALL ( 'calendar' ), 'calendar'[data] )
    )

 

How i can calculate avarege for this measure for last year?

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

Not working.

 

I managed to write measure myself:

 

_opened / average_wip =
DIVIDE (
    SUMX ( VALUES ( 'calendar'[data] ), [_opened / cumulative_total / dynamic] ),
    COUNTROWS ( 'calendar' ),
    0
)

 

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Bessonnizza , Try like

Example

Cumm Sales = CALCULATE(Average(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
Cumm Sales = CALCULATE(Average(Sales[Sales Amount]),filter(date,date[date] <=max(Sales[Sales Date])))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak, thx for answer. 

 

If i need to calculate average of closed tickets, it was easy to calculate using yours example. But i need to calculate average of  open tickets. Count of open tickets in each day i get from this measure:

_opened / cumulative total / dynamic =
VAR check_date =
    SELECTEDVALUE ( 'calendar'[data] )
RETURN
    CALCULATE (
        SUMX (
            'tickets_created',
            IF (
                'tickets_created'[create_date] <= check_date
                    && 'tickets_created'[close_date] >= check_date,
                1
            )
        ),
        FILTER ( ALL ( 'calendar' ), 'calendar'[data] )
    )

 

Anonymous
Not applicable

Hi  @Bessonnizza

 

Try below dax expression:

 

average=Averagex(allselected('tickets_created'),[_opened])

 

If the above doesnt work,could you pls share me your sample data?

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @Anonymous 

 

Not working.

 

I managed to write measure myself:

 

_opened / average_wip =
DIVIDE (
    SUMX ( VALUES ( 'calendar'[data] ), [_opened / cumulative_total / dynamic] ),
    COUNTROWS ( 'calendar' ),
    0
)

 

 

Anonymous
Not applicable

Hi  @Bessonnizza ,

 

Glad to hear that ,so your issue is solved now,right?If so,could you pls mark the reply as answered to close it?

Much appreciated.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.