Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Currently I have data in the following ways:
Material Month Order#
M01 2012-01 540
M01 2012-02 560
M01 2012-03 640
M01 2012-04 580
M01 2012-05 510
M02 2012-01 340
M02 2012-02 360
M02 2012-03 140
M02 2012-04 580
M02 2012-05 810
I want to creat a bar chart with Month Range Selection.
I noticed that this could be done by Slide or Calendar, however, i wonder how i can create a Calendar without date?
Could anyone please help?
Thanks in advance
Jerry
Hi
In this sort of situation, useFor your dimension for your dimension:
Date(MonthStart(Date#(Month, 'YYYY-MM')), 'YYYY-MM')
Now it does not matter which day in the month you select.
If you really dont like the calendat object which will not allow you to select a month only, create month and year list boxes
Month(Date#(Month, 'YYYY-MM'))
Year(Date#(Month, 'YYYY-MM'))
(These will work in the front end, but for performance, all these transforms are best done in your script)
Hope that helps.
Jonathan
you can do it on many ways, for example paste this expression as a dimension
=makedate(left(Month,4),right(Month,2),1)
Hi Pari,
Thanks for your reply.
But the new dimension, the data will be transfromed into YYYY-MM-01, is there any solution to ignore 01 in the Calendar?
for example, to set up a Calendar like:
2012
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
Regards
Jerry
Hi
In this sort of situation, useFor your dimension for your dimension:
Date(MonthStart(Date#(Month, 'YYYY-MM')), 'YYYY-MM')
Now it does not matter which day in the month you select.
If you really dont like the calendat object which will not allow you to select a month only, create month and year list boxes
Month(Date#(Month, 'YYYY-MM'))
Year(Date#(Month, 'YYYY-MM'))
(These will work in the front end, but for performance, all these transforms are best done in your script)
Hope that helps.
Jonathan
=monthname(makedate(left(Month,4),right(Month,2),1))
yeah, this looks more proffesional:))
Hi Jonathan,
It is cool!
but i have another question regarding to this solution, how can i create a value range based on that one?
with the list box, i can only choose the specified month for my chart, do you have any ideas?
Regards
jerry
Hi Pari,
If i creat a Calendar object with this variable, the value can not be displayed, do you have any ideas?
Regards
Jerry
Jerry
That is a different question. For the best response, I would suggest that you create a new post.
In the post, provide details of the ranges you want (eg MTD based on the selected month/year, YTD, prior MTD, prior YTD etc etc).
There are many ways of dong this and the best way will depend on your model's data structure, the user requirements etc etc. The more information you provide, the better. If possible, post your model or a representative sample when you create the new post.
BTW if the original question has been answered, please mark the correct answer.
Regards
Jonathan
Hi Jonathan,
Thanks for your help, I will make a new post.
Regards
Jerry