Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
__dec___
Contributor II
Contributor II

Year&Week on line chart - large gaps on year roll over

Hi

I have plotted same data using a scatter plot and a line chart, I have formatted the date so it appears as year workweek so for workweek 43 of 2016 it will appear as 201643. The data plots fine until a year role over where the axis contains date values beyond 201652 right up to 201699 before rolling over into 201701. This puts a 48 week gap between the data. Is there a way to prevent the axis exceeding 201552, 201652, 201752 and so on?

I have attached a screen capture of the graph as an example

5 Replies
luismadriz
Specialist
Specialist

Hi Declan,

I'd recommend to remove those weeks from the loading script.

If that's not possible, then I'd recommend the following.

In the loading script create a field from YRWW called WW unless you already have it. It could be something like this:

Right(YRWW,2) as WW

Then in the chart, edit each measure calculation to something like this:

Sum({<WW-={">52"}>} Sales)

This works for me in Qlik Sense with a simple bar charts to remove unwanted dimensions but haven't tried it with scatter plots

I hope this helps!

Cheers,

Luis

__dec___
Contributor II
Contributor II
Author

Hi Luis

Thanks for the reply. I have managed to add a ww field as you suggested.

However Qlikview does not appear to have a measure calculation on the line chart or scatter plots. I have dimensions or expressions. I cannot figure out how to integrate your second expression.

Do you have a qlikview example app that you could share which demonstrates this.

Regards

Declan

luismadriz
Specialist
Specialist

Hi Declan,

Yes, I mean using something like this on your expressions: Sum({<WW-={">52"}>} Sales). I don't have QlikView but it's got to be the same.... I think...

Can you please share the expression used for your line chart for example? and also for the number in the scatter plot that appears on the Y axis.

Cheers,

Luis

Monicalingan
Contributor III
Contributor III

Hi Declan,

I tried it with few example dates and the 'WeekName' should do it(See attached script and result)

Hope it helps.

Thanks,

Monica

luismadriz
Specialist
Specialist

Hi,

Just wondering to know how you went about this one,

Cheers,

Luis

PS. When applicable please mark the appropriate replies as Correct. This will help community members know which discussions have already been addressed and have a possible known solution. Please mark replies as Helpful if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as Helpful if you feel additional info is useful to others