Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI
I am trying to create a chart that automatically shows the latest 4 weeks. I have managed to do this on the attached QVW by using
sum( {$<
DateNum = {"<=$(=vMaxDate)"}
,Date=
>} Qty)
However this only works if the data is sorted desending and i really want the trend chart to be assending ie oldest to newest date. When i change the sort to asending it shows the oldest week not the latest 4.
In my example i really want the chart to show 29/1, 04/02, 11/02 and 18/02 but have the ability to change for peoples selections
Does anyone have any suggestions?
Thank you
hei
the 21 means going 3 weeks back from the last week start which means its only selecting the last three week
what you did before was selecting all the weeks prior to the last week
an you put a trashhold of 4 on the values to show on the x-axis
but because you had more then 4 weeks i didnt give you the slected week
when you use the max values on the x-axis it give you the first 4 by the selected sort order
usually use this when you are sorting a chart by the y-value and you want to show only the best or worst resaults
hope it helps you
if the answer helped you mark it as a correct answer
so other users will know there is a solution to your question
Hi,
In sort try to change the sort order to Load Order.
Regards,
Kaushik Solanki
hei
attach is an example
you have two graphs
one is for the last four weeks abslut
and the seconed for the last four weeks from the selected Date
Thank you this works - are you able to explain the logic behind it though? why in the expression do you have vMaxDatev2-21 - what does the -21 do?
Thank you
hei
the 21 means going 3 weeks back from the last week start which means its only selecting the last three week
what you did before was selecting all the weeks prior to the last week
an you put a trashhold of 4 on the values to show on the x-axis
but because you had more then 4 weeks i didnt give you the slected week
when you use the max values on the x-axis it give you the first 4 by the selected sort order
usually use this when you are sorting a chart by the y-value and you want to show only the best or worst resaults
hope it helps you
if the answer helped you mark it as a correct answer
so other users will know there is a solution to your question