Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Tommmy
Contributor III
Contributor III

Subtotals in QlikSense

Hi experts

We need subtotals for the values of:

Subtotal 1: 10, 15, 20

Subtotal 2: 25,30,35,40,45

Subtotal 3: 50, 55

Can we do this in the app or any coding in the load script? Can you please provide a sample script? Thanks!

 

Tommmy_0-1659957092085.png

 

Labels (4)
2 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

You can add one more dimension and create a pivot table.

 

Load

  *

inline [

Account, Dim2

10, Subtotal 1

15, Subtotal 1

20, Subtotal 1

25, Subtotal 2

30, Subtotal 2

35, Subtotal 2

40, Subtotal 2

45, Subtotal 2

50, Subtotal 3

55, Subtotal 3

];

Help users find answers! Don't forget to mark a solution that worked for you!
Tommmy
Contributor III
Contributor III
Author

Thank you, is this correct?

Trans:
LOAD
*
FROM

[lib://Transactions.qvd] (qvd);

Load
*
inline [
REPACCOUNT, Subtotal
10, Subtotal1
15, Subtotal1
20, Subtotal1
25, Subtotal2
30, Subtotal2
35, Subtotal2
40, Subtotal2
45, Subtotal2
50, Subtotal2
55, Subtotal3
];