Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

Totals mistmatch

Dear All,

In my expression am using if condition as below

(if(match([Group] , 'GENERAL' ,'IMPU','INSTITUTE') or match([HQ1] , 'MUMBAI','NAGPUR' , 'PATNA', 'SOUTH MUMBAI') or  WildMatch([Code], 'NP*')

,

([Sales Amount])

,

(SUM([Sales Return])

))

using this expression am getting correct values in row wise but when we check the total then we found that total is showing wrong

PFA .....

Thanks

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Is this error in pivot table?

If yes then

Not sure but try with Aggr()

try like

sum(Aggr(YourEntireExpression,Dim1,Dim2))

If in Straight table then use sum of rows in Expression tab.

Kind 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 🙂

View solution in original post

3 Replies
ecolomer
Master II
Master II

Try with:

Sum(if(match([Group] , 'GENERAL' ,'IMPU','INSTITUTE') or match([HQ1] , 'MUMBAI','NAGPUR' , 'PATNA', 'SOUTH MUMBAI') or  WildMatch([Code], 'NP*')

,

([Sales Amount])

,

([Sales Return])

)


or

(if(match([Group] , 'GENERAL' ,'IMPU','INSTITUTE') or match([HQ1] , 'MUMBAI','NAGPUR' , 'PATNA', 'SOUTH MUMBAI') or  WildMatch([Code], 'NP*')

,

sum([Sales Amount])

,

(SUM([Sales Return])

))

PrashantSangle

Hi,

Is this error in pivot table?

If yes then

Not sure but try with Aggr()

try like

sum(Aggr(YourEntireExpression,Dim1,Dim2))

If in Straight table then use sum of rows in Expression tab.

Kind 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 🙂
prma7799
Master III
Master III
Author

Thanks Max....

Can you tell me How to write this is in straight table...

Thanks