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

Pivot table: incremental count expression of the first N elements

Hi everybody,

I'm working with pivot table, I've got a column with the factory (the most productive ones),in the second the count of produtcs built in the factory,  in the third the incremental counter (but only for the first 35 or 10 elements), in the 4th the percentage of the incremental counter (on the total) .

factorynumber productincremental count% on the total
1145714570,42%
2137628330,81%
3103538681,11%
660744751,28%
758450591,45%
854556041,60%
952461281,75%
1052166491,90%
36073

10,31%

Can I do anything like that? I'm taking about the incremental count and the percentage.

I know in the straight table you can take choose the first 10 or 30 elements (sorted as you want) but I'd like to do it in a pivot table.

I want not to use too much code (statics table) in the script, because I'd like to let the user change the selections and modify the set of items anytime.

Can you help me?

Kind regards

a

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Guess you must be using QV10 or earlier. I used Dimension Limits in the original. Here's an updated version that includes a chart using a calculated dimension.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

See attached file. It's using just some sample data. Yours would have more records and would probably use (range)count instead of (range)sum. The principles are the same though.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you Gysbert,

the only difference is that I'd like to take the first 10 elements of a list of 1000.

Your qvw shows all the rows of the table and the total should count only the items of the (10) factory with the best productions.

That's the real question.

Do you think you can handle that?

Amos

Not applicable
Author

I found the answer here:

http://community.qlik.com/message/48854#48854

Thank you, for your help.

Gysbert_Wassenaar

Guess you must be using QV10 or earlier. I used Dimension Limits in the original. Here's an updated version that includes a chart using a calculated dimension.


talk is cheap, supply exceeds demand
Not applicable
Author

That's right, I forgot saying I'm using QV10! Sorry for that.

I never hear'd about dimension limits, I wish I could work with 11.

you've been quick and useful, thank you so much.

A.

Not applicable
Author

I'd like to add a question:

What is the difference between pivot table and straight?

I mean: if I use straight table I canshow the total with sums of rows, but the expression doesn't work properly; otherwise if I choose pivot the total of the columns is 0.

I should attend to a real qvw course, but they are very expensive.

Not applicable
Author

Another problem comes out if you want to block another dimension in the set analysis.

I mean: If I 'd like to use in the aggr dimension something like:SUM($<YEAR={2012}>} you will have a lot of problem because the dimension won't work properly (the rank can't evaluate the set analysis)

Help!