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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show only falling trends?

Hello, another newbie here. I apologize if this is (probably) a duplicate, but I haven't found an answer so I have to ask.

I would like to find out which items were sold less from one year to another. The approach I have taken so far is to show a line chart with vertical quantities (sum of quantities per order detail) and horizontal years, each line representing a different item. Then I filter data by two consecutive years and I can see which trend lines are rising and which are falling. But it is not clearly visible when there are lots of lines (items) and when they are close together or at a small angle. I am thinking of showing only lines that have risen or fallen from start year to end year. Can I do that and how, or am I approaching the problem from the wrong angle? Should I look for that data differently and how? Thank you!

2 Replies
swuehl
MVP
MVP

You can do this using set analysis, like shown in attached sample file.

Something along these lines:

rising:

=sum({<Item= {"=sum({<Year = {$(=max(Year))}>}Value)-sum({<Year = {$(=min(Year))}>}Value)>0"}>} Value)

falling:

=sum({<Item= {"=sum({<Year = {$(=max(Year))}>}Value)-sum({<Year = {$(=min(Year))}>}Value)<0"}>} Value)

Not applicable
Author

Thank you for your answer, but my work was due before the administrators made this question public so by now I don't really have the need for an answer any more and consequently the will for validating the answer. Thank you anyway, I'm sure the answer will be useful for someone else, but let that be a lesson to the moderators that waiting several days for approval in some situations renders this community support useless.

Kind regards