Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Highlighted
Not applicable

Pivot table, with calculated column

Hi,

This is an actualization of a previous post, Thanks to Gysbert Wassenaar to solve one of my problems.

I have this entry data

MonthDataTypeValue1Value2
01R101
01O121
02R111
02O152

and I would like to obtain this result

MonthTotal0201
DataTypeRO%RO%RO%
Value1212777,78%111573,33%101283,33%
Value22366,67%1250,00%11100,00%

where the rows Value1 and Value2 are expresions and the colum % is an aditional value of the dimension DataType

Value1 = sum(Value1)                    in % column sum({<DataType={'R'}>} Value1) / sum({<DataType={'O'}>} Value1)

Value2 = sum(Value2)                    in % column sum({<DataType={'R'}>} Value2) / sum({<DataType={'O'}>} Value2)

but the result obtained is this

MonthTotal0201
DataTypeRORORO
Value1212711151012
Value2231211

Any suggestions?

1 Solution

Accepted Solutions

Re: Pivot table, with calculated column

See attached example. No idea how this holds up under millions of records. You may have to resort to creating summary tables in the script.


talk is cheap, supply exceeds demand
4 Replies

Re: Pivot table, with calculated column

See attached example.


talk is cheap, supply exceeds demand
Not applicable

Re: Pivot table, with calculated column

Gysbert, Thanks for this solution. It's working fine, but the number of records generated is too high. We are working with millions of records (and Value1, Value2 are really Value1, Value2 .. Value60) and inplementing this solution, the application performance is greatly deteriorated. Is there any other way to get the desired result without greatly increasing the number of records?

Re: Pivot table, with calculated column

See attached example. No idea how this holds up under millions of records. You may have to resort to creating summary tables in the script.


talk is cheap, supply exceeds demand
Not applicable

Re: Pivot table, with calculated column

Gysbert, Thanks for this solution. It's working fine.

Community Browser