Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ugurarslan
New Contributor

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
Contributor

Re: Ignore all selections in field selected

Try this

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

Re: Ignore all selections in field selected

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

ugurarslan
New Contributor

Re: Ignore all selections in field selected

Thanks a lot, the result is -.

ugurarslan
New Contributor

Re: Ignore all selections in field selected

Hi the result is now 538 instead of 40.

shruthibk
Contributor

Re: Ignore all selections in field selected

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])

Re: Ignore all selections in field selected

ugurarslan

Have you tried this?

ugurarslan
New Contributor

Re: Ignore all selections in field selected

yes I did and it didn't work

MVP
MVP

Re: Ignore all selections in field selected

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?

Community Browser