Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
shane_spencer
Specialist
Specialist

Putting Totals / Expressions as extra rows instead of columns

I've created a chart / table and I'm almost there with how it should look. Values are correct but layout is not as required.

Dimension is Liability.

Expression 1 is Sum by liability.

Ex.2 The TOTAL of “S/Rated” and “O/Scope with Credit”.

Ex3. And TOTAL of “S/Rated”, “O/Scope with Credit” and“Exempt”

Ex4. Is Ex.2 / Ex.3

Actual.PNG

 

 

 

What I want to is change the lay-out of the chart/table so those expressions appear as extra rows. i.e.

Target.PNG

 

 

 

 

 

Attached is the qvw with the data and the chart I've done. Anyone got any ideas how to do this?

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

You can do this with either a straight table as you have already done or maybe even better with a pivot table:

 

Merknad 2020-02-09 174046.png

 

The (C) Pivot Table use a single expression for each line - you will have to drag-and-drop the expressions from being positioned in the top giving a single line over to the left so they appear as multiple lines in your pivot table. Then you will get all the numbers in a single column. This approach doesn't and shouldn't use a dimension - unless you want to extend it to have columns for different years and/or companies ...

Merknad 2020-02-09 175300.png

 

(A) and (B) are two different ways of achieving it with a Straight Table.

The (A) approach relies on that you add a helper table in your data model to add the extra four lines as "artifical" TB_GL_TYPE_LIABILITY entries... not ideal. The expression is just a single one put it has If and Pick to select the right calculation depending on which row is being generated in the  table.

Merknad 2020-02-09 182240.pngMerknad 2020-02-09 174047.png

The (B) approach has individual expressions that corresponds to each row. To get it to display row-wise you will have to tick the checkmark named HORIZONTAL in the PRESENTATION tab in the properties of the straight table. That flips columns into rows and wise versa. Here it is not necessary with a dimension.

I have attached the example QlikView Application/Document that the screenshot was taken from above...

 

 

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

You can do this with either a straight table as you have already done or maybe even better with a pivot table:

 

Merknad 2020-02-09 174046.png

 

The (C) Pivot Table use a single expression for each line - you will have to drag-and-drop the expressions from being positioned in the top giving a single line over to the left so they appear as multiple lines in your pivot table. Then you will get all the numbers in a single column. This approach doesn't and shouldn't use a dimension - unless you want to extend it to have columns for different years and/or companies ...

Merknad 2020-02-09 175300.png

 

(A) and (B) are two different ways of achieving it with a Straight Table.

The (A) approach relies on that you add a helper table in your data model to add the extra four lines as "artifical" TB_GL_TYPE_LIABILITY entries... not ideal. The expression is just a single one put it has If and Pick to select the right calculation depending on which row is being generated in the  table.

Merknad 2020-02-09 182240.pngMerknad 2020-02-09 174047.png

The (B) approach has individual expressions that corresponds to each row. To get it to display row-wise you will have to tick the checkmark named HORIZONTAL in the PRESENTATION tab in the properties of the straight table. That flips columns into rows and wise versa. Here it is not necessary with a dimension.

I have attached the example QlikView Application/Document that the screenshot was taken from above...

 

 

shane_spencer
Specialist
Specialist
Author

Amazing, thanks Petter!