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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Average Daily Volume within Date Range

Hello,

Looking to display average ticket volume from Date A to Date B on a card. The date range will be static and used as a reference to new volume after Date B.

 

My data structure:
Ticket ID, Create Date...

 

Desired result:
Average Daily volume Created between June 1 - July 26 = 150 tickets daily.

 

I think it should be simple, but I am not finding info specific to my needs for this Measure.
Trying to follow this Measure formula (and change SUM to AVERAGE), but having difficulty understanding syntax - autocomplete is not helping me specify the ticket field in the table.

                   Static_Dates_Between = CALCULATE(SUM(TransactionData[Revenue]),
                   DATESBETWEEN(CalenderDate[Date],DATE(2016,01,01),DATE(2017,12,31)))

 

2 REPLIES 2
foodd
Super User
Super User

Try this generic pattern  ( wrote from my phone so it is untested 😞

 

Average_Daily_Ticket_Volume =
VAR DateA = DATE(2023, 6, 1) // Replace with your actual Date A
VAR DateB = DATE(2023, 7, 26) // Replace with your actual Date B
VAR NumDays = MAX(DATEDIFF(DateA, DateB, DAY)) + 1
RETURN
DIVIDE(
CALCULATE(COUNTROWS('YourTableName'), 'YourTableName'[Create Date] >= DateA && 'YourTableName'[Create Date] <= DateB),
NumDays
)

 

Replace 'YourTableName' with the actual name of your table that contains the "Ticket ID" and "Create Date" columns.  With this measure, you can now place a card visual in your report, and in the "Values" field, select the "Average_Daily_Ticket_Volume" measure. It will show the desired result of the average daily ticket volume between the static date range of June 1 to July 26.

Anonymous
Not applicable

Thanks for your quick reply. 

 

I tried this and plugged in my table and column names. It gave me an error "The MAX function only accepts a column reference as an argument." - any ideas on how to get around this?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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