Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can't combine rows

Hello,

I am new to Qlikview and developing a dashboard.  I am working on a Pivot table that gives details to users based on type of service provided.  Currently I have this:

dash.png

As you can see it works well but I need to be able to display all similar services as a single row with total number of units.  This means that the 5th entry in the example above should simply be one row with a total of 131 Units.  Units is a column read from a database and the 3 entries come from the fact the user has placed 3 orders each with a different number of units so there are 3 rows.  I have tried changing the column to be a calculated dimension "sum(Units)" but my table then looks like below:

dash.png

I have looked online and found an option to use the aggr function to perform a 'group by' but I am not having success.  I have tried  "=If(Service = 'SAN GB', Aggr(sum(Units),Units),Units)".  This however gives wrong values and "=If(Service = 'SAN GB', Aggr(sum(Units),UnitPrice),Units)" gives the below results:

dash.png

*I added the if statement since there are other values in the column "Service" but they are not causing issues.

I don't know how best to get the results I need.  Any help or a nudge in the right direction will be appreciated.

Thanks!

3 Replies
tresesco
MVP
MVP

Remove UnitPrice from dimension and use expression like =Sum(UnitPrice)

Not applicable
Author

Thanks for the help.  The issue with this is that there are more columns after Units that detail when the services were ordered:

dash.png

If I was to make the Units an expression instead of a dimension wouldn't it mess up the rest of the table?  If possible a calculated dimension would work best for my needs from what I have read.

*Sorry for not clarifying this earlier

tresesco
MVP
MVP

That is why it is always recommended to share your sample qvw, otherwise, the thread length keeps growing with such unwanted misunderstanding issues. Preparing examples for Upload - Reduction and D... | Qlik Community