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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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