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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Tax return

Dear All,

I need to calculate tax return after each month which would be a difference between purchase tax as a new dimension e.g. TaxReturnAmount so that in the following example I'd get 2 in February and -1 in March.

Month, Side, TaxAmount

Jan, Sales, 8

Jan, Purchase, 10

Feb, Sales, 5

Feb, Purchase, 4

Any idea how to calculate it?



BR,

Przemek

2 Replies
Not applicable
Author

It looks like an if statement would work.

= sum(if(Side='Sales',-Taxamount,Taxamount))

Not applicable
Author

Ben, thanks your reply. The key thing in this exercise is to move the result to next month. In your statement it stays in the original one.

BR,

Przemek