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: 
Max1984
Contributor III
Contributor III

Sum Costs per month and team - Table Pivot

Good morning,

I have three different tables with costs divided by team and date, how can I create a pivot table with 2 dimensions (team and month) and three cost expressions? I would like to divide the costs not by date but by month.

The "Produzione" column is the costs per team pertaining to a table:

SUM({<[Mese di produzione]={">=$(=$(vInizioPC))<=$(=$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Benestari Certificati])

The "Costi" column is given by the sum of the costs divided by team belonging to two different tables:

SUM({<[Master Calendar Date Calc]={">=$(=$(vInizioPC))<=$(=$(vFinePC))"}, Anno=,Mese=>} [# Imponibile Squadra])+ SUM({<[Mese Emolumenti]={">=$(=$(vInizioPC))<=$(=$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti])

The "Economic result" column must be the difference between the two previous columns.

How can I do?

 

imag1.jpg

Labels (1)
2 Replies
Taoufiq_Zarra

Hi,

if I understand correctly, you'll just have to change the dimension  [Data Mese Di produzione] to

=(Date(monthstart([Date Mese Di produzione]), 'MMM-YY'))

maybe !

cheers,

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Max1984
Contributor III
Contributor III
Author

Good morning,

this solution only works for a pivot table with "team" size and date (=(Date(monthstart([Date Mese Di produzione]), 'MMM-YY'))) and expression:

SUM({<[Mese di produzione]={">=$(=$(vInizioPC))<=$(=$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Benestari Certificati])

 

but if I add an expression that calculates the costs of other 2 tables referring to different dates, the sfax pivot table.