Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a table in QlikView, with some conditions: I have a QVD with several
events, each event from one client, like this:
Client Event Qtd
A 01 10
A 02 5
A 03 8
B 01 5
B 03 2
...
I want to compare the event number "01" with the other events:
Client Event (=01) Others (<>01) Others/Event#01
A 10 50 5,0
B 5 2 0,4
So, I tried to put Set Analysis like this:
= Sum( {$<Event={'01'}>} Qtd) , but doesn't work (because the Event "01" is not selected, just Event "04")
= Sum( {1<Event={'01'}>} Qtd) , but doesn't work too (in this case, all clients get "all" events #01- the same number for all clients)
How can I solve it ??
Thanks,
Fabio.
Hello Fabio,
You can try using below in your First expression for Event 1:
=Sum({<Event={01}, Name=>}Qtd)
Let me know if this was helpful, or any thing else is required.
thanks,
itsangad
Can you tell me what didn't work in this expression for you?.
Each Event has a "Name" and a "Date". When I select some Name, the column "Event = 01" returns 0. (The Event 01 got out of scope of "$")...
Try to put in your example:
LOAD * Inline [
Date,Client,Event,Name, Qtd
'jan/2013',A,01,Event01,10
'fev/2013',A,01,Event01,10
'jan/2013',A,02,Event02, 5
'jan/2013',A,03,Event03, 8
'jan/2013',B,01,Event01, 5
'jan/2013',B,03,Event03, 2];
Then put a List of Names and Dates, and choose "Event 02", for example (the column "Event=01" returns 0). If I use "1" instead of "$", the column "Event=01" sum all Dates (wrong too).
Thanks again.
Fabio.
Hello Fabio,
You can try using below in your First expression for Event 1:
=Sum({<Event={01}, Name=>}Qtd)
Let me know if this was helpful, or any thing else is required.
thanks,
itsangad
Thanks itsangad. It works fine.
There are many variables in addition of "Name" and "Date". I need to put "all" in set analysis? There are some "generical" expression to consider any selection in other variables?
Thanks a lot.
Fabio.
Hello Fabio,
As per my understanding, you need to put all variables which effect the change of the value of Qtd. Rest you can give it a try, surely someone else might give you a generic expression, if any.
thanks,
itsangad
Great! Thanks again.
Fabio.
Excellent! It is exactly what I need.
Tks!