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: 
ugurarslan
Creator
Creator

Ignore all selections in field selected

Dear all,

I have a sheet which with two KPI's, which are showing 1 KPI for the number by month and the other one KPI shows me the total ytd.

For the first KPI I am using the following expression:

=sum([Fruit Type]={'apple'}>}[AR USD]), the result is triggered by the filter selection YEAR Month, so if you select 201803 you get 10 etc.

For the second one I am using the following:

Sum({<[Year Month]=1{">=$(=YearStart(today()))<=$(=MonthEnd(AddMonths(today(),-1)))"},[Fruit Type]={'apple'}>} [AR USD]), this number needs to stay 40 USD apples sold this year. Doesn't matter which selection you do in YEAR Month.

But what happens now is if I select 201803 in Year month, the first KPI Month changes correctly, but YTD also changes in to 10.

So my question is:

How can I make this field a static field and it shows me all AR on apples despite the year month selected:

Sum({<[Year Month]=1{">=$(=YearStart(today()))<=$(=MonthEnd(AddMonths(today(),-1)))"},[Fruit Type]={'apple'}>} [AR USD])

Thanks

Ugur

8 Replies
shruthibk
Creator
Creator

Try this

Sum({<[Year Month]={">=$(=YearStart(today()))<=$(=MonthEnd(AddMonths(today(),-1)))"},[Fruit Type]={'apple'},[Year Month]=>} [AR USD])

MK_QSL
MVP
MVP

Sum({1<[Year Month]={">=$(=YearStart(today()))<=$(=MonthEnd(AddMonths(today(),-1)))"},[Fruit Type]={'apple'}>} [AR USD])

ugurarslan
Creator
Creator
Author

Thanks a lot, the result is -.

ugurarslan
Creator
Creator
Author

Hi the result is now 538 instead of 40.

shruthibk
Creator
Creator

According to your requirement you have to disregard the selection of year month


1)Sum({<[Year Month]={">=$(=YearStart(today()))<=$(=MonthEnd(AddMonths(today(),-1)))"},[Fruit Type]={'apple'}>} [AR USD])-Please check if this expression gives 40 result below expression should also give the same

2)Sum({<[Year Month]={">=$(=YearStart(today()))<=$(=MonthEnd(AddMonths(today(),-1)))"},[Fruit Type]={'apple'},[Year Month]=>} [AR USD])

MK_QSL
MVP
MVP

ugurarslan

Have you tried this?

ugurarslan
Creator
Creator
Author

yes I did and it didn't work

sunny_talwar

What is the reason to have a 1 here?

Capture.PNG

Do you have two YearMonth fields or just one? 201803 is the same field as the one you have in your set analysis or are they different?