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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
loke2014
Contributor
Contributor

Create expression when expression 1 is higher than expression 2

Hi,

I have created a straight table with 2 total sales expressions as below:

(a) Current month with dimension =Product 1, Product 2, Product 3, Product 4

(b) Previous month with dimension =Product 1, Product 2, Product 3, Product 4

I would like to create a third expression whereby it is populated with the difference between current month and previous month total sales by product as dimension in a new column.

Any idea how this can be done?

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Product is your dimension?

Then just use something like

=Column(1) -Column(2)

or rewriting your original expressions, e.g.

=Sum(Sales) - Sum( {<PrevMonthSetAnalysis>} Sales)

View solution in original post

2 Replies
swuehl
MVP
MVP

Product is your dimension?

Then just use something like

=Column(1) -Column(2)

or rewriting your original expressions, e.g.

=Sum(Sales) - Sum( {<PrevMonthSetAnalysis>} Sales)

loke2014
Contributor
Contributor
Author

Thank you for the guidance.