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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
y5famfnatudu
Resolver I
Resolver I

Averagex vs Division (which one for calculating Tickets per Working Day)

Hello,

 

I'm sorry if it's a stupid question, I would like to calculate the number of tickets per working day.

Should I be using Averagex(Working_Days, Tickets) or Divide (Tickets, Working_Days)? and Why?

 

Thank you so much

Simon

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hello Simon,

Quite an interesting question actually 🙂

 

The "correct" method to use would depend on your exact requirements.

 

The key points to be aware of (I'm making some assumptions about how you've defined Working_Days and Tickets):

  • AVERAGEX disregards any rows of the table supplied in the 1st argument where the 2nd argument is blank. In your case, this would have the effect of dividing Tickets by the count of working days where Tickets is nonblank.
  • The DIVIDE method would include all Working Days regardless of the values of Tickets

Personally, I prefer to use the DIVIDE method as I would generally want to count all Working Days regardless of whether Tickets has a nonblank value on any given date.

 

To illustrate, I have attached a small PBIX example. For this example, let's assume that Working Days are Mon-Fri.

OwenAuger_1-1688295084327.png

The two important measures to illustrate the difference are:

# Tickets per Working Day AVERAGEX = 
AVERAGEX (
    FILTER ( 'Date', 'Date'[Work Day] = 1 ),
    [# Tickets]
)
# Tickets per Working Day DIVIDE = 
DIVIDE ( [# Tickets], [Working Days Count] )

In this example, over the first 7 days of January 2023:

  • # Tickets = 17
  • Number of working days on which # Tickets is nonblank = 4 (Mon, Wed, Thu, Fri)
  • Number of working days total = 5 (Mon-Fri)
  • AVERAGEX measure returns 17 / 4 = 4.25
  • DIVIDE measure returns 17 / 5 = 3.40

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hello Simon,

Quite an interesting question actually 🙂

 

The "correct" method to use would depend on your exact requirements.

 

The key points to be aware of (I'm making some assumptions about how you've defined Working_Days and Tickets):

  • AVERAGEX disregards any rows of the table supplied in the 1st argument where the 2nd argument is blank. In your case, this would have the effect of dividing Tickets by the count of working days where Tickets is nonblank.
  • The DIVIDE method would include all Working Days regardless of the values of Tickets

Personally, I prefer to use the DIVIDE method as I would generally want to count all Working Days regardless of whether Tickets has a nonblank value on any given date.

 

To illustrate, I have attached a small PBIX example. For this example, let's assume that Working Days are Mon-Fri.

OwenAuger_1-1688295084327.png

The two important measures to illustrate the difference are:

# Tickets per Working Day AVERAGEX = 
AVERAGEX (
    FILTER ( 'Date', 'Date'[Work Day] = 1 ),
    [# Tickets]
)
# Tickets per Working Day DIVIDE = 
DIVIDE ( [# Tickets], [Working Days Count] )

In this example, over the first 7 days of January 2023:

  • # Tickets = 17
  • Number of working days on which # Tickets is nonblank = 4 (Mon, Wed, Thu, Fri)
  • Number of working days total = 5 (Mon-Fri)
  • AVERAGEX measure returns 17 / 4 = 4.25
  • DIVIDE measure returns 17 / 5 = 3.40

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

WOW @OwenAuger , a great description for how it works, I really appreciate it so much.

Regards, Simon

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.