Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vvvvvvizard
Partner - Specialist
Partner - Specialist

Average Daily Value

SAY MY expression IS sum(sALES)

i have a week cycle week ( so i need to divide by number of days in that week ) 

I have a half year cycle , so i need to divide by number of days in that year-half

Year cycle , i need to divide by number of days in year 

quarter cycle .. so i need to  divide by number of days in that quarter 

each is a separate expression for each cycle using a condition 

The latest period in year for eg has a few days as its not year end , that is the complication so i cant just say 365

2 Replies
acsaggar
Contributor II
Contributor II

It seems to me you need to create a master calendar with flags (0/1) for the various dates.

E.g

isinQTD

isinYTD

isinMTD

isinCurrweek

these flags should exist down to the day level so each day has a flag for every time period. then you can use a set analysis expression for each flag, and aggregate using avg.

Brett_Bleess
Former Employee
Former Employee

Below is a link to a query I ran on the Design Blog that might be of help along with what the other posted provided:

https://community.qlik.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&f...

Hopefully one or more of the posts may help you get to where you need to be here.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.