Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wrong values, comparison problem

Hi,

I´ve got a problem when showing certain values in a chart. Some of the values in the chart are displayed as 0 values.

For example when I am creating a comparison between the values of 2010 and 2009.

I added a screenshot as reference..

error loading image

The expression I use (for the second one on the right):

SUM({$<Order.Jaar={$(=Only(Order.Jaar)-1)}>} $(vVariable1))

The Variable:



aggr(Sum (Orderdetail.NETSALESAMOUNT)+sum(Ordermisc.NETSALESAMOUNT)
+sum(Orderjob.NETSALESAMOUNT)+sum(Orderoutsourced.NETSALESAMOUNT)
+sum(Orderworkactivity.NETSALESAMOUNT)+sum(Orderitem.NETSALESAMOUNT)+sum(Orderassembly.NETSALESAMOUNT),
Vertegenwoordiger.Name)



I can't seem to get the right value in this column..

Kind regards,

6 Replies
martin59
Specialist II
Specialist II

Hi,

You can try something like that :



aggr( RangeSum ( sum(Orderdetail.NETSALESAMOUNT), sum(Ordermisc.NETSALESAMOUNT), sum(Orderjob.NETSALESAMOUNT), sum(Orderoutsourced.NETSALESAMOUNT), sum(Orderworkactivity.NETSALESAMOUNT), sum(Orderitem.NETSALESAMOUNT), sum(Orderassembly.NETSALESAMOUNT)),
Vertegenwoordiger.Name)


Not applicable
Author

Hi Martin,

Thank you for your response..

Your solution doesn't seem to work for me, the table shows only "-" if I edit the variable..

martin59
Specialist II
Specialist II

Why have you create an aggregate fonction ? If you the average per name you have to do something like this :

avg(aggr(sum(...),Name))


Not applicable
Author

I don't need the average, it has to show the values of the previous year.. (f.e, you select 2010, you will get the 2010 values and the 2009 values)

Any help would be appreciated!

Not applicable
Author

Anyone else with a other solution?

jonathandienst
Partner - Champion III
Partner - Champion III

Have you tried without the aggr?


<blockquote><pre>RangeSum ( sum(Orderdetail.NETSALESAMOUNT), sum(Ordermisc.NETSALESAMOUNT),
sum(Orderjob.NETSALESAMOUNT), sum(Orderoutsourced.NETSALESAMOUNT),
sum(Orderworkactivity.NETSALESAMOUNT), sum(Orderitem.NETSALESAMOUNT),
sum(Orderassembly.NETSALESAMOUNT))



If you do use aggr in an expression in the chart, you need to include all the chart dimensions in the aggr dimension list so the chart can dimension the the expression properly.

Jonathan

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