Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Need help with set analysis

New to Qlik view.Please help

need to find increase/drop in sales between 2 dates selected from 2 different list boxes

(salesnew-salesold)/salesold

1 Solution

Accepted Solutions
Not applicable

Re: Need help with set analysis

you can find the right syntax in the attachement.

There was just one waste equals sign in the expression, the correct expression should be

SUM({$< Weekend1 = {"$(vWeekend1)"}>} Amount)

greets,

Max

9 Replies
Not applicable

Re: Need help with set analysis

may be i did not explained it enough

user can pick 2 diff. dates from 2 diff list box and the result should be the drop/increase in sales.

(salesWeek1-salesweek2)/salesweek1

Message was edited by: sandeepteotia   File is attached

Not applicable

Need help with set analysis

Sandy,

Might be easier if you recreate this in another qvw and upload it, or just post the one you're working on.  As you have explained it, it's tough to tell exactly what you're going for.  There may be a better way to achieve your solution than you have considered.

Not applicable

Need help with set analysis

Hi Sandy,

if i understand you correctly, i use a similar function in our main application.

We did not link the calendar dimension table to facts table. We use two variables holding the selected min and max date from the calendar listbox (only 1 calendar is used, and with min and max user selections of more than 2 values are compensated)

Your needed expression would then look like

sum({$< factsdate = {'=$(varDate1)'} >} sales) - sum({$< factsdate = {'=$(varDate2)'} >} sales) / sum({$< factsdate = {'=$(varDate1)'} >} sales)

The expression should work (except syntax errors) as long as you don't put a date(part) in the dimension

As i actually don't have access to a designer, i cannot test it

Not applicable

Need help with set analysis

Hi Noster,

                  thank yu Noster.You mean the user need to select 2 dates from the same calendar listbox and then save them in 2 diff. variables

Not applicable

Need help with set analysis

Hi Noster,

                      its picking the max and min weekend but the sales is picked as same amount.so the resultset is 0.

Am i missing something.

=sum({$< Weekend = {'=$(vWeekend1)'} >} Amount)-sum({$< Weekend = {'=$(vWeekend2)'} >} Amount)

Not applicable

Need help with set analysis

Put the Set Analysis expressions in separate columns to locate errors

Week1 : sum({$< Weekend = {'=$(vWeekend1)'} >} Amount)

Week2: sum({$< Weekend = {'=$(vWeekend2)'} >} Amount)

and check if their results are correct. Perhaps it's justed caused by missing brackets or the like

Not applicable

Re: Need help with set analysis

Hi Nostor,

                   File is attached. I  tried doing that.I missed something.

thank you very much for your help.

Not applicable

Re: Need help with set analysis

you can find the right syntax in the attachement.

There was just one waste equals sign in the expression, the correct expression should be

SUM({$< Weekend1 = {"$(vWeekend1)"}>} Amount)

greets,

Max

Not applicable

Re: Need help with set analysis

it works. thanks Max!!!!!!!!!!

Community Browser