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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
bahare76
Helper I
Helper I

Calculate Average number of tickets per month for 2021

Hi Everyone, 

I have used the following measures for calculating the average tickets for 2020. 

Total Ticket = COUNT('Report Ticket'[Request ID])
NumofDistinctDates = DISTINCTCOUNT('Report Ticket'[Date].[Month]
Average = DIVIDE([Total Ticket],[NumofDistinctDates])
 
However, this measure didnt give the correct output when applying for 2021. This is because i dont have the data yet for April 21 onwards. I was wondering how can i correct this.
 
TQ
Bahare
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@bahare76 

Try it like this.

 

Average Tickets =
AVERAGEX (
    VALUES ( 'Report Ticket'[Date].[Month] ),
    CALCULATE ( COUNT ( 'Report Ticket'[Request ID] ) )
)

 

Or, if you want to keep the measures seperate your month count would look like this.

 

NumofDistinctDates =
CALCULATE (
    DISTINCTCOUNT ( 'Report Ticket'[Date].[Month] ),
    KEEPFILTERS ( 'Report Ticket'[Date].[Date] <= TODAY () )
)

 

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@bahare76 

Try it like this.

 

Average Tickets =
AVERAGEX (
    VALUES ( 'Report Ticket'[Date].[Month] ),
    CALCULATE ( COUNT ( 'Report Ticket'[Request ID] ) )
)

 

Or, if you want to keep the measures seperate your month count would look like this.

 

NumofDistinctDates =
CALCULATE (
    DISTINCTCOUNT ( 'Report Ticket'[Date].[Month] ),
    KEEPFILTERS ( 'Report Ticket'[Date].[Date] <= TODAY () )
)

 

 

Thanks @jdbuchanan71 . It worked...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.