Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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...