Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sersal10
Creator
Creator

How to filter and make another thing out of the filter appear in the graph too.

Hi all, 

I am working with a dataset about music festivals. I have columns such as quantity (tickets sold), code_event (an ID for the festival), and a previous_code_event (from last year). 

I need to make a line graph where I display the ticket sales of an event that I choose in a filter, and then in the same graph, another line with the tickets sold last year. 

So I have 2 meassures:

One with this formula:        Sum(quantity)     

And the second one:             Sum({<event_code = {"$(=previous_event_code)"}>} quantity)

I see that the code changes to the previous one in the formula correctly, and I have data, as there is quantity in the rows with that event_code ERT2301. But as I filtered choosing the event whose code is ERT2401, the ERT2301 cannot be seen.

Any solution?

Any help so much appreciated!

 

Labels (1)
1 Solution

Accepted Solutions
TcnCunha_M
Creator III
Creator III

        Sum({< Fields_you_want_to_Ignore = ,event_code = {"$(=previous_event_code)"}>} quantity)

I.e 

 Sum({< Year = , event_code = ,event_code = {"$(=previous_event_code)"}>} quantity)

 

As you think, so shall you become.

View solution in original post

3 Replies
TcnCunha_M
Creator III
Creator III

        Sum({< Fields_you_want_to_Ignore = ,event_code = {"$(=previous_event_code)"}>} quantity)

I.e 

 Sum({< Year = , event_code = ,event_code = {"$(=previous_event_code)"}>} quantity)

 

As you think, so shall you become.
sersal10
Creator
Creator
Author

Thank you! 

You mean that the options I put as filters should go in the fields_I_want_to_ignore? So the filtering is ignored?

TcnCunha_M
Creator III
Creator III

yes, every field you add : field_name =, it says to qlik: Ignore the selection on this field

 

As you think, so shall you become.