Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
Here are my requirements.
I have two measures Sales and Revenue. My measure is a date field. I want to shot the Sales and Revenue as a line in a line graph for the last four years. I am using this expression and it is giving me last four year data from the current year.
=if(Year([Date Spread])>year(today())-4,date#(Year([Date Spread])))
But another requirement is if I select a customer who has sales and revenue data only for 2003, the graph should show the data for 2003, but when I select the customer from 2003 it does not fetch any data. I know it is because I am pulling the data from current year.
Any help is appreciated. Thanks in advance.
Check your if statement. You limited the chart to show 2014 and above, therefore 2013 and below are not expected
Yes, I know that. Can you help with the statement that will fix this problem?
You may define it as this?
=if(Year([Date Spread])>year(today())-4,date#(Year([Date Spread])), Date#(Year([Date Spread])))
When I do not select any year, on the graph, it shows the the median of sales and revenue which are linked variables. So if I use the solution you have provided above, it shows all the years if I do not select any customer. But I only want four years as a default.
So my solution should be something like that will keep the default view of last four years, but if I select one customer it should show the Sales and revenue for that one customer irrespective of year.
I do use two options.
Option 1: Use bookmark to select the last for years as default filter.
Option 2: Have two charts, the first chart is locked to fours and the second will respond to user selection