Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
khaycock
Contributor

Total Sum Expression

I am having a weird problem with the sum of many freight charges where the total sum of DEL_GBP_FREIGHT should be 20.00 as there is only 1 lot of 20.00 in the set of data, but the expression is calculation 40 and I have no idea why!! help.PNG

This might be something silly but I really can't figure it out. I think its having an effect on another expression too.

Any ideas?             

Tags (1)
1 Solution

Accepted Solutions
Frank_Hartmann
Honored Contributor II

Re: Total Sum Expression

may be try:

sum( DISTINCT DEL_GBP_FREIGHT)

hope this helps

View solution in original post

11 Replies
qlikviewnovice
Valued Contributor II

Re: Total Sum Expression

Hi

Upload sample data am using personal edition. I can't open the application.

Re: Total Sum Expression

Try to remove filter for Dealer Name and then look whether values are showing which is hide the 20 ??

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
antoniotiman
Honored Contributor III

Re: Total Sum Expression

Hi,

You have 2 rows

Regards,

Antonio

Frank_Hartmann
Honored Contributor II

Re: Total Sum Expression

may be try:

sum( DISTINCT DEL_GBP_FREIGHT)

hope this helps

View solution in original post

khaycock
Contributor

Re: Total Sum Expression

But when I want to do a total sum in another chart of all the £20 charges, I can't DISTINCT it because it will return only 20 when it should actually be 60?

If i take out the DISTINCT I get the problem again...

totals.PNG

What could I do in this situation?

I'm also trying to get a sum of the Split UPS Charge but that seems impossible too

Partner
Partner

Re: Total Sum Expression

you have 2 rows for order no.100262879

see attach

Partner
Partner

Re: Total Sum Expression

lastscandatetime and consignment have different value

khaycock
Contributor

Re: Total Sum Expression

Even if remove those rows from the script it is still saying 40..

Partner
Partner

Re: Total Sum Expression

maiby

ItemDetail:

LOAD  distinct ManifestDate,

//     Consignment,

//    AddressCode,

//     Service,

//     CustomerCode,

     Name,

     Address1,

     Address2,

     Address3,

     Address4,

     PostCode,

     Country

//     Package,

//     Reference,

//     From_Name,

//     Route,

//     Weight,

//     LastScan,

//     LastScanDatetime,

//     Reference2,

//     Reference3,

//     Reference4

    

FROM

(biff, embedded labels, table is Items$);