Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

incorrect aggregation at grand level

Hi I am a Qlikview newbie. I want to draw a line graph using the table in test123 file: I want to add the positive inventory together, so change all negative values to 0 in adjusted inventory field.

If I add Account to the dimension in Graph table, then Adjusted Inventory Value would be correct, but if I take it out, then the calculation changes to inventory. I want to see sum of adjusted inventory by date.

Order_date    Adjusted Inventory Value

    total                   $196

1/1/12                    $76

1/10/12                  $120

How do i fix it? Thanks!

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Try

=sum(if(Inventory*Price<0, 0, Inventory))*avg(Price)

Hope this helps,

Stefan

View solution in original post

2 Replies
Highlighted
MVP
MVP

Try

=sum(if(Inventory*Price<0, 0, Inventory))*avg(Price)

Hope this helps,

Stefan

View solution in original post

Highlighted
Specialist II
Specialist II

PFA

Guess that's your expected result

--Siva