Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
manu1512
Creator
Creator

Sales greater than previous year

Hi all,

 

This is the interview questions.

 

There is table having companies sales yearwise.

 

Now I want to fetch company names which have more sales than previous year.

 

Can any one tell me that..how to approach this solution

 

 

Kind regards

Adarsh

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Create a table with company as dimension and this expression

=If(Sum( {<year={$(=max(year))}>}sales) 

>

Sum( {<year={$(=max(year)-1)}>}sales), 'Greater than previous year')

View solution in original post

1 Reply
Vegar
MVP
MVP

Create a table with company as dimension and this expression

=If(Sum( {<year={$(=max(year))}>}sales) 

>

Sum( {<year={$(=max(year)-1)}>}sales), 'Greater than previous year')