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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table

Hello

i have a probleme with the sum in the pivot table.

Chantier Genre Type Serie Cout du matériel 13 650PrixNombre Engin 39
Total1365035039
CARRIERE ROMMANA GABESTotal1365035039
PELLETotal10503503
R170N5031184710503503
CHARGEUSETotal0018
HL770LBO4112560018
GROUPE ELECTROGENETotal0018
34069ES24190018


i have a problem with the sum of the table.

the logic total is (3*350=1050)

but QV recalculate the sum in the total of the expression in the end of dimension ( 39 * 350 = 13650) but the right sum of the first (1050+0+0))

how can i correct it

thanks

3 Replies
Not applicable
Author

do not use sum() function in "Prix" and "Nomber Engin 39".......

just use it as it is ,means just field name without any function.

regards,

Dixit

pover
Partner - Master
Partner - Master

If the column "Prix" has a sum and "Nombre Engin 39" has a sum you can't use a sum(Prix * Nombre Engin 39) anyway. Use the expression within "Prix" and "Nombre Engin 39" and make sure it is a sum(x*y) and not a sum(x)*sum(y).

Regards.

Not applicable
Author

Hi,

thank you for yours responses .

in the begening i would to explain the goal of the table: i want to calculate the cost of rent of the cars, So this cost is the number of the day ( Nombre Engin) * the price of the day ( Prix).

when i execute your recommendations, i have this results :

Chantier Genre Type Serie Cout du matériel 23 450PrixNombre Engin 67
Total2345035067
RVE 543 CHOUTRANATotal28
CHARGEUSETotal28
938F2RM112028
CARRIERE ROMMANA GABESTotal1365035039
GROUPE ELECTROGENETotal18
34069ES241918
CHARGEUSETotal18
HL770LBO41125618
PELLETotal10503503
R170N5031184710503503


the expression is

*Prix = Prix

* Nombre Engin= count(Suivi_Engin.Journee)

* Cout du matériel= Prix * count(Suivi_Engin.Journee)

so the problem, i don't have the number of day of rent, i count this in the table.

I 'm waiting for your helps

Thank you.