Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Not applicable

Help with expression in chart, and suppressed values

Hello all,

As you have read, I have a small problem that I cannot solve on my own.

I need to sum all red values, so that I can get the percentage marked in green.

The blue values should be suppressed, and the final chart should look like picture 2.

I have tried with Len(trim(Location)>0, Location) as a calculated dimension, as well as adding same conditional to the expression.

Also I have attached the sample qvw with scrambled data, which is the application that I'm having trouble with.

Thanks in advance

1 Solution

Accepted Solutions
Highlighted
jsaradhi
Valued Contributor

Re: Help with expression in chart, and suppressed values

instead of a constant number assigned to the variable TotalSizeOfQvw, modify its definition to

=sum(total {<Location=E({<Location={''}>})>}Workfiles.Length)/1048576

and make sure to check suppress when value is null for Location dimension.

1.png

View solution in original post

6 Replies
Highlighted
jsaradhi
Valued Contributor

Re: Help with expression in chart, and suppressed values

instead of a constant number assigned to the variable TotalSizeOfQvw, modify its definition to

=sum(total {<Location=E({<Location={''}>})>}Workfiles.Length)/1048576

and make sure to check suppress when value is null for Location dimension.

1.png

View solution in original post

Highlighted
Not applicable

Re: Help with expression in chart, and suppressed values

Select "Suppress When Value is Null" option on the Chart Properties --> Dimensions

Chart_Dim.JPG.jpg

Highlighted
jsaradhi
Valued Contributor

Re: Help with expression in chart, and suppressed values

in addition to the two things in my previous post, you need to check show partial sums in presentation tab. then you will have the following:

1.png

Highlighted
Not applicable

Re: Help with expression in chart, and suppressed values

Could you please send me qvw?

Highlighted
jsaradhi
Valued Contributor

Re: Re: Help with expression in chart, and suppressed values

here you go!

Highlighted
jsaradhi
Valued Contributor

Re: Re: Re: Help with expression in chart, and suppressed values

sorry try this one...

ps: the variable seems to be getting recalculated at document open. use the following expression for Total size in %

sum(Workfiles.Length) / sum(total {<Location=E({<Location={''}>})>}Workfiles.Length)