Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

after clicking on one bar at bar chart, value changes

Hello,

Sometimes I'm setting up a bar chart with very easy function like this for example:

sum(aggr(count(Specific value),Ordernumbers))

/

sum(aggr(Count(all value),Ordernumbers))

After setting up a time dimension I get the following:

Applicable88_0-1616369942387.png

 

As you can see I get a several 100% bars. When I click on them the percentage value changes to what is actually right:

For Example calendarweek 2020/25 :

Applicable88_1-1616369942401.png

 

Why it returned the value of 100% in the first place ?

Indeed a specific value devided to all values at that caladar week would be 28,6% and not 100%.

Why it displayed 100% in the first place and how to fix that? And it might only happens with Aggregations-functions?

 

Hope someone can help me with this understanding. 

Best. 

2 Solutions

Accepted Solutions
lironbaram
Partner
Partner

Hi, 
when you use aggr function, the function disregards the chart dimension, this why results are changing when you make a selection . 
you need to add the chart dimension into your expression 
something like : 

sum(aggr(count(Specific value),Ordernumbers,week))

/

sum(aggr(Count(all value),Ordernumbers,week))

View solution in original post

lironbaram
Partner
Partner

As I wrote the aggregation function disregards the dimension but if all the orders are created and closed in the same week. this display will work, but if not then you can't know to which week the order will be assigned
Just remember when using aggr functions you need to include the chart dimension 

View solution in original post

3 Replies
lironbaram
Partner
Partner

Hi, 
when you use aggr function, the function disregards the chart dimension, this why results are changing when you make a selection . 
you need to add the chart dimension into your expression 
something like : 

sum(aggr(count(Specific value),Ordernumbers,week))

/

sum(aggr(Count(all value),Ordernumbers,week))

View solution in original post

Applicable88
Creator III
Creator III
Author

@lironbaram , thank you so much. Really didn't find a solution until now. 

But one thing I have to ask and why it was not clear to find the fault in the first place: 

The problem was not with every bar, some had same value also when they where clicked on, and others had different value as described.

So in which regard are the  aggregation -mesaures   totally disconnected from the dimension  before I click on any bar? Seemingly the bar had a dimension set of course. 

 

lironbaram
Partner
Partner

As I wrote the aggregation function disregards the dimension but if all the orders are created and closed in the same week. this display will work, but if not then you can't know to which week the order will be assigned
Just remember when using aggr functions you need to include the chart dimension 

View solution in original post