Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pre Calculated Like For Like boolean

Hi Guys,

I'm hoping someone could help me. I work for a retail organisation with allot of stores spread globaly.

When i would like to build a high level (Global or country for example) dashboard that shows the store performance disregarding new openings or closings of stores i would need a like for like calculation.

Like for Like defenition: show only data(turnover for example) of stores that where open lastyear same period and are currently still open.

I would like to build a boolean for this so users can select if they want all the figures to be like for like or not.

Every Store has an openyearweekcode and a closedyearweek code. When a store is open, the closedyearweekcode is 2099W52.

If its closed, the closedyearweekcode containts the year/week when the store is closed.

I would like to build in script a following if statement:

If (openyearweekcode <= currentyearweek – 52 

     and

    closedyearweekcode >=currentyearweek

,

'Like For Like'

,

'All Data')

I've converted openyearweekcode,closedyearweekcode and yearweekcode to the same date format.

I've also created a autonumber field on yearweekcode to cound back 52 weeks.

Hopefully you could help me with the last bit!

Thanks allot!

1 Reply
Not applicable
Author

I've come allot further.

I'm only struggeling with yearweek count back to 52weeks.

I am trying resident load

on Max(PeriodID) -52.

This does't seem to work. Any Idea's?

Thanks!