Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Error

Hi Experts,

I m getting the wrong sum of amount and quantity when i use the following expression

sum([Billing Sales Quantity_FKIMG])

Sum ( [Billing Sales Amount_NETWR])

I have attached a image of my pivot table for ur reference

The correct amount is given as dimension for your reference.

Actually in the expression, the values are getting doubled..

Is my expression is right??

or Any suggestions why the values are getting doubled??

Please help me out... Its ver urgent.

Thanks,

Gaayathri

6 Replies
Not applicable
Author

I think that the expression is right. I think that your problem is in the data model. The Sum expression is generating duplicated the values, because the data was duplicated in the data model, and it differs in a dimension that you are not showing in the table. It usually happend when you do any type of table join in the load script.

Not applicable
Author

Hi Claudio,

I have tried eliminating duplication in data model. But still it doesn't works for me!! Can u please suggest  me the posibility for the occurance of data??

Cheers,

Gaayathri

SunilChauhan
Champion II
Champion II

i hope u need to do the following

convert pivot into straight table

gott properties-> expression-> select expression one by one and check the radio Noofrows inplace of Expression total

and then convert into pivot table.

hope this help

other wise attach sample file if u can.

Sunil Chauhan
Not applicable
Author

Hi sunil,

I tried doing it but it doesnt work... I cannot provide  u the file as it is abt 100MB

thanks,

Gaayathri

Not applicable
Author

Hi,

I have faced the same issue some time back. It is due to doublin of records while performing left or right joins. One thing we can do is, create another table with the Primary key fields and the Amount fields. Then try the same expressions in the chart.

Hope it will help.

SunilChauhan
Champion II
Champion II

you can also try following

sum(Total <primary keyfield>[Billing Sales Quantity_FKIMG])

Sum ( Total <primary keyfield> [Billing Sales Amount_NETWR])

hope this help

Sunil Chauhan