cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bahare76
Regular Visitor

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 II
Super User II

@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 II
Super User II

@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

Thanks @jdbuchanan71 . It worked...

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors