Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filtering and comparing two month year

What I want to do here is this, I have 3 years worth of data and what to compare costs in any given month.

How do I get create a calculated column that will be the difference of Cost Per Kg (in the right) - Cost Per Kg (in the left)

So in the example below, I would want have a column there that would be called Cost Per Kg (difference)

Row 1 will then be 15.66-15.74

Could you please help me stalwar1‌ /swuehl‌?

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

My bad, you need After instead of Before

ceil( Sum([Total Amount])/Sum([Actual Weight]),0.01) - After(ceil( Sum([Total Amount])/Sum([Actual Weight]),0.01))


Capture.PNG

View solution in original post

15 Replies
sunny_talwar

May be using Before function

CostPerKgExpression - Before(CostPerKgExpression)


Missing Manual - Before() and After()

Anonymous
Not applicable
Author

Thanks for the response. How do I do generate the calculated column in the pivot table?

sunny_talwar

Not sure I understand your question?

Anonymous
Not applicable
Author

I was hoping to create a new column in the pivot like below. Thanks.

sunny_talwar

Just add a new measure like this

CostPerKgExpression - Before(CostPerKgExpression)

Make sure to replace the CostPerKgExpression above with the expression you have for CostPerKg..

Does this make sense?

Anonymous
Not applicable
Author

Cost Per Kg is actually Cost/Weight.

When I added measure of Cost Per Kg Delta with Expression: ceil( Sum([Total Amount])/Sum([Actual Weight]),0.01)-Before(ceil( Sum([Total Amount])/Sum([Actual Weight]),0.01))

The other month would not show up, this is how it looked like

sunny_talwar

You still have 2017-02 selected for your chart right?

Anonymous
Not applicable
Author

Yes. I still have it selected.

sunny_talwar

Not sure... would you be able to share a sample?