Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Use the RangeSum and Before function in the Pivot Table

Hello~!

I would like to calculate the MTD figure using the rangesum and before function in the pivot table, it's OK if there is only one dimension in the pivot table, but the result isn't my expectation when there are two dimension, please refer as below and the attached file.  Thanks a lot.

Capture.PNG.png

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Use the RangeSum and Before function in the Pivot Table

Hi

You need a TOTAL in the Before(). See updated qvw attached.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
Employee
Employee

Re: Use the RangeSum and Before function in the Pivot Table

What is the expected?

kiranmanoharrode
Contributor III

Re: Use the RangeSum and Before function in the Pivot Table

Dear WU,

It wont't work on PIVOT TABLE,

It is restricted for Straight table.

Regards

Kiran Rode

91 8976977897

danieloberbilli
Valued Contributor II

Re: Use the RangeSum and Before function in the Pivot Table

If you delete the day from the dimension you get the right values.

Note the following limitation:

If the pivot table has multiple horizontal dimensions, the current row segment will include only columns with the same values as the current column (which is your month) in all dimension rows except for the row showing the last horizontal dimension of the inter field sort order (which would be your Week). The inter field sort order for horizontal dimensions in pivot tables is defined simply by the order of the dimensions from top to bottom.

MVP
MVP

Re: Use the RangeSum and Before function in the Pivot Table

Hi

You need a TOTAL in the Before(). See updated qvw attached.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

deepaktibhe
Valued Contributor

Re: Use the RangeSum and Before function in the Pivot Table

Hi Jonathan,

Can you pleasetell me how expression

=RangeSum(Alt(Before([Count YTD]), 0), sum(Count)) will work.

Thanks