Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
danimarc12
Partner - Creator
Partner - Creator

Sum() issue

Hello guys,

I have a big issue with my app.

I can't understand why QlikSense changes some values.

Cattura.PNG

as you can see, if I add in my table Netto as a dimension I see the correct values, if I sum these values, on the second row, it display the value x2. (?!?!) I've checked also in the db and there are no differences:

Cattura.PNG

I have really no idea what's going on.

Obviously the Sum(Netto) in my DB is correct:

Cattura.PNG

Did anyone have the same problem? Do you know why it can happens and how to fix it?

This is one example, there are a lot!

 

Thanks to all!! 😩

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

To avoid duplication in the fact table, use Mapping Load, a technique similar to a left join but fundamentally different. A mapping load, on the other hand, ensures that only one of the ID records actually maps into the receiving table.

More from here: Mapping 

However, you can attempt this.

Map_Serie:
Mapping LOAD codperfor as CodperFor,
             Serie
FROM 
[lib://Garden House:DataFiles/mag_serie.qvd](qvd); 

Scarico:
LOAD *,
ApplyMap('Map_Serie', CodperFor) as Serie

FROM { Data Sources };

View solution in original post

3 Replies
BrunPierre
Partner - Master
Partner - Master

This may indicate that the data contains a duplicate row. Place all of the table's fields inside the table box to identify which ones cause duplication.

danimarc12
Partner - Creator
Partner - Creator
Author

Hi @BrunPierre ,

thanks a lot for your indication! I've found my error but I don't know how to fix it.

Basically it is here:

danimarc12_0-1671473119473.png

If I comment this JOIN everything is working good. My fact table is Scarico and I need the information of serie which is an attribute of CodArtFor.

Maybe the Join is wrong.

BrunPierre
Partner - Master
Partner - Master

To avoid duplication in the fact table, use Mapping Load, a technique similar to a left join but fundamentally different. A mapping load, on the other hand, ensures that only one of the ID records actually maps into the receiving table.

More from here: Mapping 

However, you can attempt this.

Map_Serie:
Mapping LOAD codperfor as CodperFor,
             Serie
FROM 
[lib://Garden House:DataFiles/mag_serie.qvd](qvd); 

Scarico:
LOAD *,
ApplyMap('Map_Serie', CodperFor) as Serie

FROM { Data Sources };