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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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