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: 
shah_sapana
Contributor
Contributor

Weekly Data Comparison - Week Sequence Number

I have one date from each week and data for each date. Date can vary and can not be calculated by adding or subtracting fix number.

I need to show current week vs previous week data. 

I created filter for date column. Need help calculating data for previous week by what ever available date.

I am trying to achieve it by giving sequence number to dates. But not able to find right set analysis. 

Here is sample code :

AutoNumber(T_Date) As T_DateSeq,
If(AutoNumber(T_Date)=1, AutoNumber(T_Date), AutoNumber(T_Date)-1) As T_PreDateSeq,

Filter Dimension : T_Date

Current Balance :  Sum ({T_DateSeq}Current_Balance) )

Previous Balance : Sum ({T_PreDateSeq}Current_Balance) )

I have attached data sample and dashboard visual for reference. 

Any suggestion would be really appreciated.

1 Reply
Lisa_P
Employee
Employee

Have you tried creating using the week function on the T_Date ?