Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

1 Solution

Accepted Solutions
sunny_talwar

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

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

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

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)))"}>}