Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
regowins
Creator II
Creator II

Show text only if the last 2 yrs of sales is trending down

Hi,

How do I conditionally show text only if the last 2 years for 'store A' sales is trending down? I know how to conditinoally hide and show text, just not sure how to capture the trending down for the last two years of sales.  Thanks for the help!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Something like this maybe:

=if( sum({<Store={'store A'}, Year={'$(=max(Year)-2)'}>}Sales) <  sum({<Store={'store A'}, Year={'$(=max(Year)-1)'}>}Sales) and sum({<Store={'store A'}, Year={'$(=max(Year)-1)'}>}Sales) <  sum({<Store={'store A'}, Year={'$(=max(Year))'}>}Sales), 'Show this text' )


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Something like this maybe:

=if( sum({<Store={'store A'}, Year={'$(=max(Year)-2)'}>}Sales) <  sum({<Store={'store A'}, Year={'$(=max(Year)-1)'}>}Sales) and sum({<Store={'store A'}, Year={'$(=max(Year)-1)'}>}Sales) <  sum({<Store={'store A'}, Year={'$(=max(Year))'}>}Sales), 'Show this text' )


talk is cheap, supply exceeds demand
regowins
Creator II
Creator II
Author

Just what I needed ....Thanks!