Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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_Line | Net_Amount |
---|---|
1 | $100 |
2 | $100 (Bar_Line =3 minus Bar_Line =1) |
3 | $200 |
(Blank Row) | (Blank Row) |
Maybe this blog post can help you.
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.