Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select top 5 and make chart

Hi,

I have 11 variables, which consist 0 or 1. Sometimes in 1 row they have more than one answer "1".

Var0Var1Var2Var3Var4Var5Var6Var7Var8Var9Var10Var11
A
B
A10001000000
B10000000000
A
A00001000000
B
B01001000000
A
A
B
A10001000000
A00100000000
C00001000000
A
A
A10000000010
A10000000000
A
C00001000000
B00000010000
A00000100010
A00000010000
B
B00000100000
C
C10000000000
B00001000000
B00101000000
A
A10010010000
D
B10000000000
A00000000000
A
D
C10000000000
C
A
A00100000000
C
D
A
D
A
C
A
A
C10001000000
A
A
B11000000000
A00000000000
A11000000000
E10000000000
B10000000000
D01001000000
B00001000000
B
B
B00001000000
B10001000000
B
A10000000000
B00101100000
B00000000000
B00001000000
B01001000000
B11010000000
TOTAL1764216330020

I'd like to create multiple response set. (Insted of 11 variables create 1 variable, who choose 1).

And make chart dim Var0; expression count( NEW Var)

Regards,

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Seems ok to me.

Maybe you want to count only AAA = 1?

=Count({<[qID_6613_Autofill Hotel or Airline]=, AAA = {1}>} AAA)

=Count({<AAA={1}>} AAA)

View solution in original post

6 Replies
swuehl
Champion III
Champion III

Vladimir,

I think you should be able to use the CROSSTABLE LOAD prefix also for this request (like in your previous Help with idea post).

Regards,

Stefan

Anonymous
Not applicable
Author

Hi Stefan,

I load the second crosstab with keyID.

Not_Completing_Transaction:

CrossTable (Key, AAA,2) LOAD ID, Var0,

    Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8, Var9, Var10, Var11;

    SQL SELECT ID,Var0,

    Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8, Var9, Var10, Var11

FROM "qqq".dbo."myfile";

In chart

Dim. Key

Expression: Count({<Var0=>} AAA)  ---shows my total count

but I need to in %

I tried

Count({<Var0=>} AAA) /

Count({<Var0=>} TOTAL <Key> AAA)

how to calculated in %?

Thanks,

swuehl
Champion III
Champion III

In chart

Dim. Key

Expression: Count({<Var0=>} AAA)  ---shows my total count

I am not sure what you mean with total count, it should be grouped by your dimension Key (different VarX).

I tried

Count({<Var0=>} AAA) /

Count({<Var0=>} TOTAL <Key> AAA)

how to calculated in %?

Thanks,

If your single dimension is Key, this should return 1 for all lines, correct?

Try something like:

=count( AAA) / count( TOTAL AAA)

(add set expression if needed), and change format in number tab to percentage.

Regards,

Stefan

Anonymous
Not applicable
Author

Hello Stefan,

Please see my Test file.

I made crosstab.

In chart I have the same count for all tags. (it shows my Base count, not individual count for each tags).

i did something wrong.

Regards,

swuehl
Champion III
Champion III

Seems ok to me.

Maybe you want to count only AAA = 1?

=Count({<[qID_6613_Autofill Hotel or Airline]=, AAA = {1}>} AAA)

=Count({<AAA={1}>} AAA)

Anonymous
Not applicable
Author

Thanks for your help.

You're awesome