Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
cgT
Creator
Creator

Week Number Dimension Concatenates Data From Different Years

Hello,

I have a 'PerformanceWeek' dimension that returns sales data by week number for sales into events occurring in a selected performance year. I'm selecting my performance year for sales I want to report, however the 'Week Number' dimension is returning data, in week 52, for two different years (2021 and 2022) concatenated together, as some performances in Week 52 of 2021 occurred in Week 1 of 2022.

I need to be able to separate out sales made into events in 2021 Week 52, with sales made into events in 2022 Week 52.

 

Many thanks in advance for your help.

Labels (2)
3 Replies
PedroNetto
Partner - Creator
Partner - Creator

Hi @cgT ! Look this:

week(timestamp [, first_week_day [, broken_weeks [, reference_day]]])

PedroNetto_0-1676461324184.png

 

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd...

 

cgT
Creator
Creator
Author

Thanks for the reply @PED . The issue isn't with broken weeks, it's more to do with the week number collating data for events for the previous year as well as the current, selected, one. I need a method to tell the 'PerformanceWeek' dimension to cut out event sales from week 52 2021.

 

Thanks

marcus_sommer

You need to respect all parameters and/or setting them globally for the document within the interpretation-variables, see: Number interpretation variables | QlikView Help

If really all possible variants don't fulfill your requirements you could prepare the weeks and years manually within the master-calendar by adding one or several if-loops for those cases in which the functions didn't return the wanted values.