Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to ignore certain fields using set analysis with a variable? I currently have some fields I would like to ignore in my expressions, so that my end user can view %'s based on selections.
Currently I have expression similar to this:
COUNT({<Some Set Analysis>}Pkey)
/
COUNT({<Some Set Analysis>}Pkey)
Untouched, this would be 100%. When the user makes selections, I want the top piece to be affected by selections, but not the bottom. I know I can do something like this for the bottom piece:
COUNT({<Field1=, Field2=, Field3=, >}Pkey)
but I don't want to do it this way, I have many charts and tables that I want to ignore selections in, and it will not be easy to make changes if the user wants a field added or taken off of their dashboard. How can I store this into a variable so that the variable expands to all of the fields?
I tried this:
vIgnore = Field1=, Field2=, Field3=, ........
so the expression became:
COUNT({< $(vIgnore) >}Pkey)
but qlikview doesn't seem to like this. Is there a way ignore specific fields easily? a way that I won't have to update 75 expressions everytime I need to make a change
adding ' ' around my variable works in a text object, but not a chart. I get "Allocated Memory Exceeded" error. However, just using the variable with dollar sign expansion, i.e. $(vIgnore), in set analysis seems to be working now. The syntax-check doesn't like it, but at first glance it looks like a desired result. Before I posted this I must have had a syntax error. I was playing around with this for a while and didn't get desirable results. I will come back with a conclusion
='$(vIgnore)'
is just a test for your variable expansion.
(count({< $(vIgnore) [Dummy] = {'0'}, dummy = {'1'}, Dummy = {'1'}, DateType = {'Created'}, CanonicalDate = {$(vTwelveRolling)}>} Pkey)
Change that thing to
set vIgnore='Company,Classification,FCRA,[Dispute Type?]';
(count({1<$Field-={$(vIgnore)} , [Dummy] = {'0'}, dummy = {'1'}, Dummy = {'1'}, DateType = {'Created'}, CanonicalDate = {$(vTwelveRolling)}>} Pkey)
HTH
Sasi
Hi,
Cut down ur big expression.
Use variables and store them into variables may be like;:
var1=(count({<[Dummy] = {'0'}, dummy = {'1'}, Dummy = {'1'}, DateType = {'Created'}, CanonicalDate = {$(vTwelveRolling)}>} Pkey
Then var2,var3 and then do the summation and divisions.
Thanks