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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jlampard40
Contributor III
Contributor III

Exclude Weekends from Straight table

Hi guys - how can I produce a straight table, based on the following set analysis.  I want to show the total count of our demand, based on request date, over the past 5 days (in one column), past 4 days (in one column), past 3 days(in one column), past 2 days (in one column) and yesterday (in one column).  I've sorted the individual columns as per following set analysis per column expression:

=Count({<Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-5))"}>}Event_Key)

=Count({<Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-4))"}>}Event_Key)

=Count({<Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-3))"}>}Event_Key)

=Count({<Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-2))"}>}Event_Key)

=Count({<Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-1))"}>}Event_Key)

The problem I'm having is that the weekends are creeping into this based on the above set analysis and I would like to somehow exclude these from the straight table all together.  I only have 'Request Date' as the field referring to date and somehow need Qlikview to work out which is a Saturday or Sunday (on Request Date only) and exclude from the straight table.

If you think a straight table is the wrong way to approach this, I'd appreciate your advice guys.  Rgds

Labels (1)
14 Replies
zhadrakas
Specialist II
Specialist II

i dont understand where you want to use that. in the above expression it wont work because you excluded the weekends cells!

is that a new object where you need to set the background colour?

jlampard40
Contributor III
Contributor III
Author

Jonty - how do I go about creating this 'workday' flag?  That sounds particularly useful.  Thanks.

jlampard40
Contributor III
Contributor III
Author

OK - I get that.  Excluding the weekend counts has worked fine - I get the zero in the cell which is OK.  I just want to visually show on the table that these cells refer to a weekend somehow otherwise they may wonder why there is a zero count in the cells.  Rgds

zhadrakas
Specialist II
Specialist II

if the 0 is in the cell of the calculated expression, you should go the background color expression and try it like this:

if([EXPRESSION_NAME]=0, LightGray())

 

jlampard40
Contributor III
Contributor III
Author

That works!  Thank you Zhadrakas.