Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

create a measure that gives the average daily amount of sales of any time/time range

Hi, I need a measure that gives the average daily amount of sales for any time (e.g. time range, month, year, year and a specific month chosen from filters).

For example:

If i want the average daily amount of sales of month X and year Y, I want it to sum sales  of this month of this year and divide by the the total days of this month of this year

If i want the average daily amount of sales of month X,Z and year Y, I want it to sum sales  of these two months of this year and divide by the the totall days of these months of this year

If i want the average daily amount of year X, I want to sum sales of all months and then divide by total days of the year (365)

If i want the average daily amount of year X and Z, I want to sum sales of all months and then divide by total days of these years

 

Is it possible with one measure?

Would very much appreciate your input.

 

 

1 Reply
jwjackso
Specialist III
Specialist III

I would create a Master Calendar .    Your calculation becomes Sum(Sales)/Count(Distinct Date).  If you select a year in the calendar, there should be all the dates within that year.  If you select a month in the calendar, there should be only the dates for that month.

You can also add flags to indicate if the date is a work day, weekend, holiday, etc...