5 Replies Latest reply: Nov 6, 2018 12:24 PM by jerry Ogwa RSS

    Data for max year minus four years

    Harshdeep Sikarwar

      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.