Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count number of rows per category in pivot table

hi guys,

i have a pivot table with this hierarchy

category
   product
     total

i wish a column which shows the number of products for each category. can you redirect me to a thread if my question is a duplicate?

17 Replies
Not applicable
Author

in fact that is what i did but when i found it didnt work i tried using the first dimension. still not good please check the file  i just uploaded in the original message up there..thanks

swuehl
MVP
MVP

welsa_chy schrieb:

for example

when i expand BLOC1 i have B1-1 and B1-2 and i have total 264 for each.

but this is false because when i collapse BLOC1 i have 264.

If you have the same products in B1-1 and B1-2, count(distinct Product) will result in that.

Not applicable
Author

i used count(product) and its giving me  B1-1>>338 and B1-2>>298 when i collapse BLOC1 its 338...

still not good right?

MayilVahanan

hi,

try count(distinct product),

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

yea that's what i tried from the beginning. not working you can check the file i uploaded in the original message on top..

swuehl
MVP
MVP

B1-2 seems to me a subset of B1-1 when I look at the table where you link Z3ARGOS_BLOC to PLANIF.

So the numbers seems ok to me.

Not applicable
Author

ohhhh... didn't think of that possibility!!!! thank you so much stefan !!!

i suddenly feel so stupid..LOL

thank you for taking time to reply..i really appreciate

Ram4
Contributor
Contributor

Hi, If you solved this issue, Please help me. I'm also facing same issue in NPrinting & QlikSense. Regards, Sriram P.