Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total sum is not working

Hi anybody can help me with this question?

the table below is just showing the total sum result for Meta_v12  (quantity).

Why it's not showing the TT Forecast?

Table_1

Style_id

Unit.Price (USD)

Table_2

Style_id

Color_id

Meta_v12 (is quantity)

Style_id

Color_id

Unit.Price

Meta_v12

TT Forecast

-

77.370

-

sum (Meta_v12)*Price

11143

302

100,00

60

6.000,00

11128

324

100,00

60

6.000,00

sum (Meta_v12)*Price / sum (Meta_v12)

8533

302

42,10

90

3.789,00

8533

307

42,10

90

3.789,00

11122

302

100,00

90

9.000,00

11122

324

100,00

90

9.000,00

11121

302

115,80

90

10.422,00

11121

324

115,80

90

10.422,00

Regards,

Rodrigo

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Are you looking for

=sum(Qty*Price)

as expression?

View solution in original post

5 Replies
swuehl
MVP
MVP

What is the expression behind the sum result for Meta_v12 (quantity)? It looks much bigger than just the sum of row values, or do we miss some rows in above sample?

For the other two expression, I am not sure what you want to calculate, but e.g. for Unit.Price, you probably want to show an average Unit Price? So maybe you need something like

=sum (Meta_v12 * Unit.Price ) / sum(Meta_v12)

[Please note the different bracketing, but I don't know what Price refers to, so I assumed Unit.Price]

But if you use this just as expression in a table chart, all lines will show an average price (which is the Unit.Price if looked at the lowest level, Style_id?).

So the next question would be, what is the context of your expressions? Where do you use them?

Would probably be best if you could post a small sample file.

Regards,

Stefan

Not applicable
Author

Hi Stefan,

Meta_v12 is not a expression is just a column of quantity in the table 2.

The problem is the information about price (unit price column)  just appear on table 1 with "Style" reference (without color detailing).

When a put the dimension "color" in the chart (that just appear in the table 2) everything works excetp the "total sum" information in the column TT Forecast. I think is a very simple problem that  I as a begginer is not figuring out.

Sorry my late reply,

Regards,

Rodrigo

swuehl
MVP
MVP

Rodrigo,

In the total line for Meta_v12, you show 77.370. If I sum up the single rows, I get only 660. So my question was, how do you calculate the total, what expression do you use?

It is not necessarily a problem if the price information is only part of table 1, not table2. Each color of a certain style is of same price, right?

So, have you tried my suggested expression?

It would be good if you could post some sample data, maybe an excel file or some inline table data or at best a small self containing sample app, is this feasible? Your app could use mock up data, if real data is a problem for any reason.

Regards,

Stefan

Not applicable
Author

Hi Stefan,

I'm sending you the qvw for your reference.

The question is that I need to see the total sum even I put the dimention style and color.

Thanks again for your cooperation,

Best Regards

Rodrigo

swuehl
MVP
MVP

Are you looking for

=sum(Qty*Price)

as expression?