Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've a line chart as below. Can you explain to me please how to show two week interval instead of daily on line chart? It should be showed as 02.01.2025, 16.01.2025 and soon..Many thanks.
What is the boundary of the interval? Is it the 2nd and 16th of every month? (Which would not always be 2 weeks for the second half of the day). Or is it just intervals of 14 days starting from the earliest date or some other point?
-Rob
Hi,
it is just intervals of 14 days starting from the earliest date or some other point. That is why I gave an example like that 02.01.2025, 16.01.2025 and so on..Many thanks.
You may try to create an appropriate flag within the calendar and using it as condition within the expression, maybe like:
mod(rowno(), 14) as 14DaysFlag
and then:
sum({< 14DaysFlag = {"$(=min(14DaysFlag))"}>} Value)
Thanks but not working..
What happens and why does it not fit to your expectations?
If you want to generate the interval dimension in the chart based on the current selections then you can use a calculated dimension like:
Date(MyDate - Mod(MyDate - Min(TOTAL MyDate), 14))
If you want to pre-generate the intervals in the script, you can do so like this. This gives you a fixed starting point that does not change with selections.
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Hi,
Many thanks, it is working but also I need to add max date (selected from filter) to end of the line. In this example it should be ended at 21.05.2025 because 21.05.2025 has selected from filter. I mean, the combination should be start starting date, starting date + 14 and so on. + selected date from the date filter.
Date(if(MyDate = Max(TOTAL MyDate), MyDate, MyDate - Mod(MyDate - Min(TOTAL MyDate), 14)))
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Hi,
Thank you but same result..It is not working. Thanks again.