Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total in the second dimension group by first dimension in pivotal table

Hi!

I have this dataset:

   

GroupID_1ID_2
A124A_124
B125A_125
B126A_126
C127A_127
C128A_128
C129A_129
C130A_130
D131A_131

And I would like to make a table like this:

   

GroupID_1ID_2Volumen
A124A_1241
B125A_1252
126A_126
C127A_1274
128A_128
129A_129
130A_130
D131A_1311

But I'm only able to make a table like this:

   

GroupID_1ID_2Volumen
A124A_1241
B125A_1251
126A_1261
C127A_1271
128A_1281
129A_1291
130A_1301
D131A_1311

Could anyone help me please? I have three dimensions (Group, ID_1, ID_2) and only one expression (count(ID_1), in a pivotal table.

Thanks for your effort!

1 Solution

Accepted Solutions
Not applicable
Author

Another way to do this is to use

aggr(count(DISTINCT TOTAL <Group> ID_2),Group,ID_2)

as a calculated dimension (Volume(. Add it in the second column and you get something that looks like this

Capture.PNG

View solution in original post

9 Replies
MK_QSL
MVP
MVP

Use expression

COUNT(DISTINCT TOTAL <Group> ID_2)

MK_QSL
MVP
MVP

You can also create a pivot table

Dimensions

Group

=Aggr(COUNT(DISTINCT TOTAL <Group> ID_2),Group)          //This is a Calculated Dimension

ID_1

ID-2

No Expression

Go to presentation tab

untick Suppress Zero Values

Not applicable
Author

Another way to do this is to use

aggr(count(DISTINCT TOTAL <Group> ID_2),Group,ID_2)

as a calculated dimension (Volume(. Add it in the second column and you get something that looks like this

Capture.PNG

Not applicable
Author

Ah the supress zero's. Forgot about that little trick

Not applicable
Author

Thanks for your answer! I've followed your steps, and the result was:

   

   

GroupID_1ID_2=Aggr(COUNT(DISTINCT TOTAL <Group> ID_2),Group) 
A124A_1241
B125A_1252
126A_1262
C127A_1274
128A_1284
129A_1294
130A_1304
D131A_1311

It is posible to combine the last column by each group, and for example only have one "2" in the case of the group "B"?

Thanks in advance!

Not applicable
Author

Thanks for your answer! It is necessary to have the last column? It is posible to set the Volumen column as the last in the table?

Thanks!

MK_QSL
MVP
MVP

To combine them as a group, you need to use the 2nd method of Calculated Dimension but then it need to be as 2nd column only.

Not applicable
Author

Okey, I will do it with de 2nd method! Thanks!

MK_QSL
MVP
MVP

IF you got your answer,pls close the thread by selecting correct/helpful answer.