Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Customize subtotals for Dimensions using dimensionality.

Hi all,

I am trying to customize a subtotal for a particular expression at the overall dimension level to be equal to the last weeks total (Each weeks have sequesnces where last week sequence is -1).

Please refer to image below.

At Vendor St dimension level I would like the HIS to be equal to the HIS for week 201225 and for all the other weeks un-changed. I tried using dimensionality with set analysis in expression

if(dimensionality = 1, sum({<Week.Seq = {'-1'}>} HIS), sum(HIS))

This works perfectly for all rows but not the global totals since I get the same value for Week 201225 and the sum but the other weeks are all 0. I understand why this is the case. I just can't seem to find how to solve this issue.

G.

1 Solution

Accepted Solutions
Not applicable
Author

Hi all,

Found the solution.

The expression is as follows:

if(Dimensionality() = 0 AND ColumnNo() <= 1, sum({<Week.Seq = {'-1'}>} HIS), sum(HIS))

All I did is make sure that only column 0 (Total and Last week) are effected.

G

View solution in original post

1 Reply
Not applicable
Author

Hi all,

Found the solution.

The expression is as follows:

if(Dimensionality() = 0 AND ColumnNo() <= 1, sum({<Week.Seq = {'-1'}>} HIS), sum(HIS))

All I did is make sure that only column 0 (Total and Last week) are effected.

G