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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert table into matrix

Hi all,

Appreciate your help here.

My file, source1.csv contains the following fields

ABPairPrice
111-1$3.00
121-2$3.00
131-3$4.00
141-4$4.00
212-1$2.50
222-2$2.50
232-3$5.00
242-4$5.00
313-1$3.00
323-2$3.00
333-3$2.00
343-4$2.00
414-1$6.00
424-2$6.00
434-3$2.00
444-4$2.00

Pair = A- B

I would like to display the output in the following format, which is a matrix or grid form. 

The content here is sum of the values.

               B
A
1234
1$3.00 $3.00 $4.00 $4.00
2$2.50 $2.50 $5.00 $5.00
3$3.00 $3.00 $2.00 $2.00
4$6.00 $6.00 $2.00 $2.00

Could i also get a count of the values?

              B
A
1234
11111
21111
31111
41111

THanks in advance.

1 Solution

Accepted Solutions
AbhijitBansode
Specialist
Specialist

for 1st O/P:

Dim: A, B

Measure: Price

for 2nd O/P:

Dim: A, B

Measure: count(Price)

In both pivot tables, drag 2nd dimension B to the top.

Regards,

Abhijit

View solution in original post

4 Replies
AbhijitBansode
Specialist
Specialist

Can be achieved using simple pivot table.

See attached.

Regards,

Abhijit

Not applicable
Author

WHen i use pivot table, i got the result in compact form, i,e,

ABPrice
11$3.00
12$3.00
13$4.00
14$4.00
21$2.50
22$2.50
23$5.00
24$5.00
31$3.00
32$3.00
33$2.00
34$2.00
41$6.00
42$6.00
43$2.00
44$2.00

Is there any settings i can do to make it into the matrix form?

Your reply is much appreciated.

Thanks!

AbhijitBansode
Specialist
Specialist

for 1st O/P:

Dim: A, B

Measure: Price

for 2nd O/P:

Dim: A, B

Measure: count(Price)

In both pivot tables, drag 2nd dimension B to the top.

Regards,

Abhijit

Not applicable
Author

Exactly what I need! thanks!