Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vangurideepu
Creator
Creator

Hi Qlik... i have a scenario

Hi, Qlik sense i want detach the chart, i have filers like year and month, quarter... in chart i have previous and current years sales,

here my question is that if i made any selection the previous and current years sales doesn't reflect.

kindly help me

Thanks in advance

Pradeep

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Use it {1} in Max(Year) as well


Sum({1<Year= {$(=max({1}Year)-2)}>} [POS price inclusive tax])

View solution in original post

9 Replies
jayaseelan
Creator III
Creator III

Hi Pradeep,

           You have to nullify your year field in the Chart while writing set.

            For more clarity please post some example qvf file. 

Thanks,

CELAMBARASAN
Partner - Champion
Partner - Champion

In your expression for Current Year Sales and Previous Year sales {1}

Sum({1<Year={2017}>} Sales) like this.

vangurideepu
Creator
Creator
Author

Hi celambarasan,

Thank you for quick reply...

your answer seems to correct but the year is not static, i want display year is dynamic

Sum({1<Year= {$(=max(Year)-2)}>} [POS price inclusive tax]),

if year is dynamic, not getting my desire answer.



Thank you

Pradeep

CELAMBARASAN
Partner - Champion
Partner - Champion

Use it {1} in Max(Year) as well


Sum({1<Year= {$(=max({1}Year)-2)}>} [POS price inclusive tax])

vangurideepu
Creator
Creator
Author

Sounds Great....

Thank you so much.....

OmarBenSalem

try putting the expression btw " " :

Sum({1<Year= {"$(=max(Year)-2)"}>} [POS price inclusive tax])

vangurideepu
Creator
Creator
Author

Hi celambarasan,

Thank you for reply...

i have one doubt same scenario... which means i have filters like years, quarter, month, week... when i made selection from filters that current and previous sales chart should not reflect.. but i have some other filters like products and categories and region.... when i made selection from products and category the chart should be reflect... how can i achive this.....

Can you help me

Thanks in advance

Pradeep

OmarBenSalem

Let's assume, this worked fine for you:

Sum({1<Year= {$(=max({1}Year)-2)}>} [POS price inclusive tax])


But now, you only want to prevent your expression from changing when you filter by years, quarter, month, week?


You should then adjust your expresison like this:


Sum({1<Year= {$(=max({<Year=,Quarter=,Month=,Week=>}Year)-2)}>} [POS price inclusive tax])





CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Fields that you want to exclude selections then keep those fields in set analysis as "FieldName=" and remove 1 @ the beginning of set analysis

Sum({<Year= {$(=max({1}Year)-2)}, Month=,Quarter=,Week=>} [POS price inclusive tax])