Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

percentage for due date intervals in single expression

Hello community,

I have a bunch of due date intervals like: <5d ; 5d><=30d and so on.

Those are strings in a field called AgeGroup with a corresponding ID called AgeBucket.

I built a pivot table with the AgeGroup as a dimension and a sum expression using a variable.

SUM($(vAmount))

I arranged the AgeGroup horizontally to show each due date interval in its own column.

This was fine until I also wanted to add the calculated percentage for each due date interval based on the total.

Can I do that in a single expression so that the individual intervals add up to 100% ?

Or do I have to use multiple AgeGroup expressions like this:

sum({$<[Age Bucket]={2},[Age Group]=>} $(vAmount)) /

sum({$<[Age Group]=>} $(vAmount))

Thank you,

Thorsten

1 Solution

Accepted Solutions
whiteline
Honored Contributor II

Re: percentage for due date intervals in single expression

Hi.

There is total modifier that can reject dimensions in calculation.

sum(total $(vAmount)) gives you the total amount of all AgeGroups.

sum($(vAmount)) /sum(total $(vAmount)) gives you the percentage.

Set analysis works alike user selections instead.

View solution in original post

2 Replies
Not applicable

Re: percentage for due date intervals in single expression

Share your QVW. its not clear

whiteline
Honored Contributor II

Re: percentage for due date intervals in single expression

Hi.

There is total modifier that can reject dimensions in calculation.

sum(total $(vAmount)) gives you the total amount of all AgeGroups.

sum($(vAmount)) /sum(total $(vAmount)) gives you the percentage.

Set analysis works alike user selections instead.

View solution in original post