Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression total is wrong but some of rows is right. Want them both to be the same.

Hello,

I am very new to Qlik. I have a expression:

=if(

[Device Increment + POS Amt (Prev 13 Wks)] > [Supply Amt (MRSD+POS+Inv)]

, [Supply Amt (MRSD+POS+Inv)],

[Device Increment + POS Amt (Prev 13 Wks)]

)

Both the two columns being compared are expressions also but do not have any if then statements in them. They are just additions.

In this case i get the wrong Expression total, it is double of the SUM total. Sum total is right but because i use this expression in other downstream expressions, i need the expression total to be right as well. How can i fix this.

Thanks.

4 Replies
sunny_talwar

I have had similar issues when I refer to other expressions like this. To fix the issues, I replace the expression labels with the actual expression and then it seem to give me the correct answer.

Best,

Sunny

tyagishaila
Specialist
Specialist

Hi Radhika,

Your problem is not clear to me exactly.

But as I understood, you have incorrect Total value.

If you are using Straight Table, then

Go to Straight Table Properties ---> Expressions ----> Total Mode ----> Click on last Radio Button, and select Sum of Rows.

Regards,

Shaila

PrashantSangle

Hi,

How many dimension do you have???

try

Sum(Aggr(YourExpression,Dim1,dim2))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
hic
Former Employee
Former Employee

If the totals are different from what you expect, the reason is usually that you don't use aggregation functions in your expression. I assume that [Device Increment + POS Amt (Prev 13 Wks)] is a label for your expression. So, what do your expressions look like?

See Use Aggregation Functions!

HIC