Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Tobievr
Contributor
Contributor

Bar Chart Display Current Week + 2 Previous Weeks only

Hi

I have gone though all the threads and couldn't figure it out and please need help with the following.

Bar Chart Dimension = Week

Bar Chart Measure = Sum({1<Category = {'Defy'},[Request Date.autoCalendar.Date] = {"$(=date(today()-21,'MM/DD/YYYY'))"}>}[GW - Warehouse Total])

I need to see the full values for each week, including current week. In Red Block is what I want to see only.

Thank you very much.

Bar Chart 3 Weeks.png

3 Replies
tm_burgers
Creator III
Creator III

Sum({1<Category = {'Defy'},[Request Date.autoCalendar.WeeksAgo] ={"<3"}>} [GW - Warehouse Total])

Tobievr
Contributor
Contributor
Author

Hi

I tried it and it displayed the 3 weeks as requested, but the values for each week is now different. The screenshot on the left is the original for all weeks, but if you compare it to the right chart, the Labour Costs are different. The Weeks must have the same Labour Costs for that specific week in both charts.

Appreciate the assistance

Bar Chart 3 Weeks v2.png

 

Kushal_Chawda

@Tobievr  modify your expression bit as below. create one variable like below on front end

vLast3Weeks = date(WeekStart(Today(),-2,0) )  // here 0 means first day of the week monday, change it accordingly. Then below expression

Sum({1<Category = {'Defy'},[Request Date.autoCalendar.Date] = {">=$(vLast3Weeks)"}>}[GW - Warehouse Total])