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: 
azmeerrehan
Partner - Creator
Partner - Creator

Bar Chart Vs Straight Table

Attached please find the sample xls and qvw.  I have a Bar chart and straight table.  The 2 metrics are Qty and Sales and we calculate a metrics called (Sales Vs Qty) using the below expression.

If(Sum(Qty)>Sum(Sales),Sum(Sales),Sum(Qty))

The issue is that the Bar chart and straight table both are giving different result  cuz the straight table is doing the comparison at the row level  and bar chart at the hight level.  The straight table number is correct and how can I make the Bar Chart to be the same as Straight table.

1 Solution

Accepted Solutions
sunny_talwar

Try using Sum(Aggr()) in your bar chart

Sum(Aggr(If(Sum(Qty)>Sum(Sales),Sum(Sales),Sum(Qty)), Division, Material))

View solution in original post

1 Reply
sunny_talwar

Try using Sum(Aggr()) in your bar chart

Sum(Aggr(If(Sum(Qty)>Sum(Sales),Sum(Sales),Sum(Qty)), Division, Material))