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

How to add a custom total row in a straight table?

How to add a custom total row in a straight table?

This question is Not Answered.(Mark as assumed answered)

Let's say I have the following table:

Product       Price          Qty

food           $5.00            4

bed            $10.00          6

bread         $20.00          3

Total          $35.00          13

That's easy, I know how to do that, but the thing is that I want another Straight table with the following values

     Company                   Price          Qty

     Head & Shoulders       $35.00         13   

                     Total          $35.00         13

This is a simple example, with the example that I have, I can't just calculate it again, because of some conditions that one of the table has, so what I did was CLONE THE STRAIGHT TABLE THEN SET THE "SHOW ROWS" TO 0, however the problem is that I don't know how to add the "Head & Shoulder" row.

I repeat,  I can't do the same exact calculation Meaning I can't do a Sum(price) and sum(quantity), because this works in my example, but not with what I'm doing.

1 - Is there a way that I can call the same total value that I have in the other Straight table?

2- Is there a way that I can copy the total row, and then add a custome column to it?

1 Reply
Gysbert_Wassenaar

1. No, you cannot reference cell values in other objects. Only an expression can calculate that value. So you need to reuse the same expression.

2. No, a total row (or any row) cannot be copied. QV is not a spreadsheet. You can change the label of the total. You can also create a calculated dimension to show any values you want with the valuelist function. For example =valuelist('Head & Shoulder'). Your expression would then be something like =if(valuelist('Head & Shoulder')='Head & Shoulder', sum(price)). Replace sum(price) with whatever expression that calculates the value you want.


talk is cheap, supply exceeds demand