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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jlampard40
Contributor III
Contributor III

Exclude last date in dimension

Hi - I have the following expression:

=Count({<Activity_or_Demand={'Demand'}>}Event_Key)

and using dimension called 'Financial_Year_Week'

This will show nicely a count of event keys per financial year week.  However, as this data is updated on a daily basis, I want to exclude the latest week as it will only be partial data until the following week begins.  How can I modify my expression to exclude the latest financial year week?  In this case (at the moment) I will want to exclude 'FY19/20 34' i.e. week 34 of FY 19/20.  However, I don't want to keep having to change the expression!  Would be nice to have a script which simply excludes the latest (MAX?) financial_year_week on a weekly basis.

Many thanks guys!

Rgds

Labels (1)
4 Replies
Anil_Babu_Samineni

1) You want to exclude the Max week of data in the entire model

2) Same for Max Financial Year data also?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jlampard40
Contributor III
Contributor III
Author

I just want to exclude the MAX week in relation to the field 'Financial_Year_Week'.

Rgds

Brett_Bleess
Former Employee
Former Employee

Best I have to try to help you move things forward is a Design Blog post:

https://community.qlik.com/t5/Qlik-Design-Blog/Excluding-values-in-Set-Analysis/ba-p/1471704

Here is another related to dates in set analysis:

https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511

Hopefully between those two, they may help you get things sorted until one of the more brilliant folks out here other than me can have a further look for you.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
qliksus
Specialist II
Specialist II

If you want to exclude just one week you can try the below 

=Count({<Activity_or_Demand={'Demand'} , Week=-{'$(=max({<year={"=max(year)"}>}week))'}>}Event_Key)