Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ignore date field (Year, Month, Week ) selections from chart but rest all selection should work

Hi All,

I am trying to ignore only date selections for my chart. But rest selection criteria should work normally when i am selecting something.

I got an idea how to restrict one field in the chart by reading the blogs

count({$<[Month Name]=> }[Upgraded Installation Client Dim Key])

This work fine for Month Selection

But when i try to give more than one field it does not work. 😞

Here is the expression I am trying to use for multiple selection.

count({1<[Month Name]= P([Month Name]) , [Cal Week] = P([Cal Week]),[Cal Quarter] = P([Cal Quarter])> }[Upgraded Installation Client Dim Key])

Please guide me on this issue how can i ignore more than one selection in a chart.

Thanks,

Rashmi

19 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Rashmi

Something like

count({$<[Month Name]=,[Cal Week]=,[Cal Quarter]=> } [Upgraded Installation Client Dim Key])

should work.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

Thanks a lot 🙂

This is working

Thanks,

Rashmi

Not applicable
Author

Hi Jonathan/All,

Ignoreing date fields condition worked will all the normal count() or sum expressions but its not giving expected results in

if ([Ship Month] >= POS_Month and [Ship Year] = POS_Year,Sum({$<[Link Row WID]=,[W Cal Week]=,[Cal Quarter]=>}[Aggr Net Sales Qty]))

Please help me to correct this its bit urgent

Thanks,

Rashmi

deepakk
Partner - Specialist III
Partner - Specialist III

YOu can use you exprssion in below pattern. (Please check for the syntax)

Sum({$<

([Ship Month]= {">=POS_Month"} ,[Ship Year] = {POS_Year} ,

[Link Row WID]=,[W Cal Week]=,[Cal Quarter]=>}[Aggr Net Sales Qty]))



Not applicable
Author

Hi Deepak,

I believe you are suggesting in this way

Sum ({$<[Ship Month]={'>=POS_Month'},[Ship Year] ={'POS_Year'},[W Cal Week]=,[Cal Quarter]=>}[Aggr Net Sales Qty])

I am afraid but this is not working. Can you suggest me any other way

deepakk
Partner - Specialist III
Partner - Specialist III

HI Rashmi,

Since the POS_Year and POS_Month are field name you can put in single quotes. remove it and it will work .

or check for the sysntax of set analysis for using fields. the baove is a right approach.

Not applicable
Author

Deepak Those are variables not field names actually.

and I checked removing the quotes, giving double quotes but no luck

jonathandienst
Partner - Champion III
Partner - Champion III

Rashmi

I think you need something like this:

Sum({<[Ship Month]={>=POS_Month}, [Ship Year]={POS_Year}, [Link Row WID]=, [W Cal Week]=, [Cal Quarter]=>} [Aggr Net Sales Qty]))

(I think that's right - but you may need to quote >=POS_Month in single or double quotes).

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

OK - after posting the previous post, I saw your latest ones. If those two are variables then you need:

Sum({<[Ship Month]={">=$(POS_Month)"}, [Ship Year]={$(POS_Year)}, [Link Row WID]=, [W Cal Week]=, [Cal Quarter]=>} [Aggr Net Sales Qty]))

This assumes that POS_Month and POS_Year are in the same format as [Ship Month] and [Ship Year].

Jonathan

PS: I prefer to use a "v" prefix on variable names to better differentiate between variables and fields. Take it or leave itWink.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein