Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

If id present in next year and current year then show else no

hi.

i want to show the sales of customer in the chart only if the customerid exist in current as well as next year otherwise, i want to ignore those ids.

i want to do this in front end...

please help

attached example

Gautham

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

=sum({<Customerid=p({<Period = {'2015'}>}),Period = {"2016"}>}Sales)

It says give me all the customers of 2015 and then for those customer give me sales of 2016.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
gauthamchilled
Creator
Creator
Author

Thanks kaushik,

This works for second expression, but for first expression no. I want the sales for customerids which exist in both periods.

please find the attachment..

raajaswin
Creator III
Creator III

Hi,


What i understood is an intersection, so you need to add a * in the expression


=sum({<Customerid * =p({<Period = {'2015'}>}),Period = {"2016"}>}Sales)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

Sum({<Id = p({<Year = {"2015"}>})>*<Id = p({<Year = {"2016"}>})>}Sales)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

May be this for a more dynamic expression:

=Sum({<Customerid=p({<Period = {$(=Max(Period))}>})*p({<Period = {$(=Max(Period)+1)}>})>} Sales)