Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
UncleRiotous
Contributor III
Contributor III

Two Week Rolling Date on X-Axis

I have a line chart which uses dates as a dimension. I can use a variable to switch between displaying in day, month or year using the following code...

=If($(vTogDayWeekMon)=1,Date(Floor(DATADATE)),
           If($(vTogDayWeekMon)=2,Weekend(DATADATE),
                      MonthEnd(DATADATE)))

I've been asked if we can have an option to set the dimension to display two week periods and I can't work out a way to do it. Any suggestions?

1 Reply
UncleRiotous
Contributor III
Contributor III
Author

For clarity I realise the code above doesn't give a rolling week but I know how to do that. The issue is setting a period of two weeks rather than one.