Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data for three years. I need to display line charts for all three years individually. Is there a way I can display all three charts in the same dashboard?
How do I create a separate date field with specific start and end dates. For example from my database of dates from year 2007 to 2009, I need to choose the dates for 2007 alone as a field. This way I want to choose for all three years 2007, '08 and '09. By this I can display multiple charts.
Is there a way I can create a date filed with specific start and end date (a field that shows dates of 2007 only, and like wise for '08 and '09). I feel this way I can display multiple charts with different year. I reached the forum but couldn't find any. Please point me to it if there is any. Thank you all for your help.
-SK
You CAN create a date field with a specific start and end date. Just do something like this in your script:
,if(year(Date)=2007,Date) as 2007Date
,if(year(Date)=2008,Date) as 2008Date
,if(year(Date)=2009,Date) as 2009Date
I've done similar on occasion, such as creating an ActiveEmployee field when I want a chart that only has active employees in it, but this isn't what I'd consider a normal solution to this sort of charting problem.
One common approach is to use set analysis. If you're doing total sales by month, for instance, but only want to see 2007 sales, you'd have a calendar and do this:
Dimension = Month
Expression = sum({<Year={2007}>} Sales)
And then make a chart like this for each year, though in the real world, you'd probably want to make your years offsets from the current year, which is doable but a little more complicted, I think this:
Expression = sum({<Year={$(=year(today())-3)}>} Sales)
A simpler and perhaps more sophisticated approach is to use a trellis chart. Make Year the first dimension of your chart, and then on the Dimensions tab, click on the Trellis button and enable trellis chart. It will then automatically create one sub chart per year within one object.