Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

gkluca82
New Contributor III

Plotting aggr() in a chart with set expression

Hi all.

After some work i've been able to formulate an expression with some dynamic variables, and that work very well in a chart using ITEMID as dimension.

I want also to plot this measure over the time (for example over WEEK), but the number that i get are not correct.

This is the expression (i've semplified it):

Cattura.JPG

i've tried to wrap tha entire measure with an aggr() using WEEK, but it's doesn't work.

Any ideas?

8 Replies
tcullinane
Contributor II

Re: Plotting aggr() in a chart

Add the week dimension to your table along with =$(TotalItems) as an expression. You can make sure it is what you expect in each point this way.

gkluca82
New Contributor III

Re: Plotting aggr() in a chart

i've managed to simplified the source file in order to post it.

basically i'm comparating the perfomance of some ItemID between the actual date and some days before (180).

I can display the difference of actual and old very well in the first chart, with dimension ItemId or Item_Group.

I can display it also in a Text box.

But when i'm gonna to display the same expression over the Week, it doesn't work. (bottom chart) !

How can i achieve that?

Ps: if i select a week the value is correct, but i want to show how the gap in going over the weeks...

download @ http://www.filedropper.com/aggrtest

gkluca82
New Contributor III

Re: Plotting aggr() in a chart

Any hint?

ahaahaaha
Honored Contributor

Re: Plotting aggr() in a chart

Hi Luca,

Maybe your source file you attach here on this post?

Regards,

Andrey

gkluca82
New Contributor III

Re: Plotting aggr() in a chart

i've uploaded the source file here:

http://www.filedropper.com/aggrtest

gkluca82
New Contributor III

Re: Plotting aggr() in a chart with set expression

any help????

MVP
MVP

Re: Plotting aggr() in a chart with set expression

With the level of complexity in your expression, I would suggest you to use The As-Of Table‌ to simplify your expression. This will also help you make it more efficient performance wise.

gkluca82
New Contributor III

Re: Plotting aggr() in a chart with set expression

Hi Sunny.

I've tried to implement The AsOfTable but i'm getting the same result.

My expression work perfectly when is in a Text box or in a bar chart with ItemID.

When i put it in a chart over Week it doesn't work anymore. Moreover, if i select the Week with a filter pane the value in the chart is displayed correctly.

What is the reason of this behaviour?