Forum Discussion
Average Daily Volume within Date Range
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.
- Anonymous3 years agoNot 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?