Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to add a subtotal line/empty line into a straight table?

Hi,

I'm wondering if there's a easier way to add a subtotal line into a Qlikivew Straight table. For example I need to add a row as Bar_Line 2 where the Net_Amount equals Bar_Line 3 minus Bar_Line 1.

Below is my current solution. Although the result looks good, it slows down the application since I have to concatenate the table with itself.

I also would like to add a empty row below Bar_Line 3 as a breaking space from the lines below, but I couldn't figure out how to do it.

Does anyone know a better way to do these, either thru scripting or table properties?

Thanks inadvance for your help!

Renee

Table1:

Load Bar_Line,

         Net_Amount

From ...

Concatenate

Load '2' as Bar_Line,

         IF(Bar_Line = 1, -Net_Amount, IF(Bar_Line = 3, Net_Amount,0)) as Net_Amount

Resident Table1

Bar_LineNet_Amount
1$100
2$100 (Bar_Line =3 minus Bar_Line =1)
3$200
(Blank Row)(Blank Row)
2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe this blog post can help you.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks for your reply. However I think InternalMatch can not solve my problem. Because in my fact table, I can only identify each record as Bar_Line 1, 3 or null(not all of the rest belongs to 2). So the InternalMatch won't give me any result since there's not a value as 2 in the Bar_Line field.