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: 
Anonymous
Not applicable

Expression computation for different date ranges

Hi Guy,

  1. I have a calendar which has date range selections (Start date, End date)
  2. Fact Data

            Sales

            Assets

   3           Expressions

X ratio:

Formula  for the  X ratio = Sum (Sales)/ Sum (Assets)

Here

Sum (Sales):

start date and end date is same as date range selected from the calendar.

Sum (Assets):

Start date is one day before the date selected in the calendar and end date is same as date range selected from the calendar.

Here QlikView always computing sum of sales and assets for the start date and end date selected in calendar. Is there any way I can specify asset start date should start from one day before the calendar start date while summing assets ?

Thank

Dasu.G

1 Reply
IAMDV
Master II
Master II

Hi Dasu,

You can use Set Analysis. Something like this assuming that Start date and End date are the actual field names. This is just an example expression... if possible post the sample QVW file and we can give you actual expression.

Sum ({1<[Start date] = {$(=Only([Start date]) -1)}>} Assets)

Cheers,

DV

www.QlikShare.com