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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek_stypulkow
Contributor II
Contributor II

A summary in date range for specific weekday

Hi,

can you advice on the below please:

I have to find the summary of the items in date range, but just for all Tuesday in that range.

I have used two conditions in my expression. Each of them worked perfectly fine as individual expression.

The below summary worked for date range:

sum({<Date={">=$(=Date(AddMonths( MonthStart (Today()),0),'YYYY-MM-DD hh:mm:ss.ffffff'))<$(=Date(Today(),'YYYY-MM-DD hh:mm:ss.ffffff'))"}>} Items)

The below summary worked for Tuesdays:

sum({<Date={"=weekday(Date)='Tue'"}>} Items)

but when I got them combined as below the date range is ignored resulting the summary for Tuesdays only

sum({<Date={">=$(=Date(AddMonths( MonthStart (Today()),0),'YYYY-MM-DD hh:mm:ss.ffffff'))<$(=Date(Today(),'YYYY-MM-DD hh:mm:ss.ffffff'))"}, Date={"=weekday(Date)='Tue'"}>} Items)

Can you help to resolve it?

Regards

Jacek

Labels (2)
2 Replies
maxgro
MVP
MVP

try with * 

count({$ <Date={">=01/01/2023"}*{"<=31/10/2023"}*{"=weekday(Date)='mar'"}>} Date)

jacek_stypulkow
Contributor II
Contributor II
Author

It's not resolved an issue directly but inspired me to find another working solution, thanks Maxgro.