Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Saro_2306
Contributor II
Contributor II

Displaying last 8 weeks Data

Hi All,

 

I having 2 Years data. i need to show last 8 weeks data based Selection of Week.  when i selecting particular week i shows sum of 2 week data i/o current year Data.

 

For ex. If i have data of Year 2019 & 2020 and selecting week 26 & Year 2020, my bar chart should show data week 19 to 26 of 2020. but is shows sum of 2019 & 2020.

Formula that i used.
Sum({​<Week_no={​"<=$(=(max(Week_no)))>=$(=(max(Week_no)-7))"}​,Month,Year>}​MD)
 
Anybody can help please. Thanks in Advance.
2 Replies
Chanty4u
MVP
MVP

May be try this

vMaxDate:                       =Date(Max(DATE))

vPrior8WeekPeriod:          =Date(RangeMax(vMaxDate - 56, Min({1} DATE)))

 

=SUM( {<DATE={'>= $(vPrior8WeekPeriod) <= $(vMaxDate)'}>} [Amount] )

MarcoWedel

can you please post some sample data as well as your expected result to test with?

thanks

Marco