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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subtraction in pivot table or straight table

Hi,

In my report, one of the field is getting calculated based on the subtraction of two fields. Please check the attached screen shot "PnLExp", here i want to calculate "Gross margin".

Formula is  Gross margin = Total Direct Labor Cost - Total Other Direct Cost

How i can achieve this, in pivot or straight table; pls. help.

PnLExp.png

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=Sum(Total Direct Labor Cost) - Sum(Total Other Direct Cost)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thanks for your reply. But unfortunately its not working.

Is there any other way to achieve this.

Not applicable
Author

Hi,

Try :

aggr(Sum(Total Direct Labor Cost) - Sum(Total Other Direct Cost),Pnt_Parent)

Regards

RL