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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with linear table

Hi guys,

I have some problem with a linear table.

I would like to post a qvw file but unfortunately I can't so I try to explain my problem and I post an xls file to be as clear as I can.

I'm playing with sap data.

My goal is to find an expression to calculate TOTAL COST PER TRAVEL.

So, up to now, I have this expressions that sound ok:

- total Cost per CDC (CDC = Cost Center)   

- total Km per CDC   

- unit cost per KM    

- CDC cost per travel

 

What I'm looking for is to calculate total cost per travel.

In my last expression I have "CDC cost per travel". Now I want to sum those costs per single travel.

I tried with:

=aggr( sum(Column(4)), VBELN )

but it doesn't work.

I attached an xls file to better undrstand my problem.

I exported my linear table on it.

I'll appreciate any suggestion.

Best regards

Giampiero

12 Replies
Not applicable
Author

Kiran

I attached an image of my data model.

i'm playing with these three tables:

CIS, VG_CO,DOC_CO

Hope it helps

Giampiero

Not applicable
Author

Hi Pari,

I tried to use Pivot table but my problem still resist.

Thanks for your reply

Not applicable
Author

Hi Kiran,

you were right.

The expression correct is:

=sum(TOTAL <VBELN> aggr((sum (distinct total <Doc_CO.CDC> VG_CO.WKGBTR) / sum (distinct total <Doc_CO.CDC> ZZ_KM_ESTT) ) * ZZ_KM_ESTT,Doc_CO.CDC,VBELN))

THANK yOU so much for your help.

I really appreciated

Best regards

Giampiero