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: 
kevbrown
Creator II
Creator II

Date Calculation

Simple one I'm sure.

I have a table with Date, Issue ID and Issue Category. All i want to do it create a simple table showing the number of issues by issue category but need it for the current week only and last week. My week needs to start on a sunday.

Thanks

Kev

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

This week: 5/8 - 5/10

{<Date = {"$(='>=' & Date(WeekStart(Today(), 0, 6)) & '<=' & Date(Today()))"}>}

Last Week: 5/1 - 5/7

{<Date = {"$(='>=' & Date(WeekStart(Today(), -1, 6)) & '<=' & Date(WeekEnd(Today(), -1, 6)))"}>}

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

May be add this as set analysis to your expression:

{<Date = {"$(='>=' & Date(WeekStart(Today(), -1, 6)) & '<=' & Date(Today()))"}>}

kevbrown
Creator II
Creator II
Author

Sorry, I meant a calculation for this week and another for last week

avinashelite
MVP
MVP

try expression like

// for current week

count({<Date={">(=weekstart(Today(),0,-1))"}>} [Issue ID])

//for last week

count({<Date={">(=weekstart(Today(),-1,-1))"}>} [Issue ID])

sunny_talwar
MVP
MVP

This week: 5/8 - 5/10

{<Date = {"$(='>=' & Date(WeekStart(Today(), 0, 6)) & '<=' & Date(Today()))"}>}

Last Week: 5/1 - 5/7

{<Date = {"$(='>=' & Date(WeekStart(Today(), -1, 6)) & '<=' & Date(WeekEnd(Today(), -1, 6)))"}>}