Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a lot of dates with an amount , i want to create a bar chart by year thats shows the amount of each year, and in the year 2008 i want to sum the amounts of year 2008 and the previus 2007 2006 2005...
May be like this
If(Year = 2008, Sum(TOTAL {<Year = {"<=2008"}>} Measure), Sum(Measure))
If this is something you want to do based on selection...then may be this
If(Year = Min(TOTAL Year), Sum(TOTAL {<Year = {"<=$(=Min(Year))"}>} Measure), Sum(Measure))
almost, only 2008 its the sum of the rest of years (2007,2006,2005....) 2009 2010 etc only the sum of that year
thanks for the answer
May be like this
If(Year = 2008, Sum(TOTAL {<Year = {"<=2008"}>} Measure), Sum(Measure))
If this is something you want to do based on selection...then may be this
If(Year = Min(TOTAL Year), Sum(TOTAL {<Year = {"<=$(=Min(Year))"}>} Measure), Sum(Measure))
I used it in a test data with only year in date field and it works, but mi data have 00/00/0000 format, i tried to use the function year but i makes me an error
if(year([DEFAULT DATE])=2008,sum(TOTAL{<year([DEFAULT DATE])={"<=2008"}>} [amount]), Sum([amount)/1000000)
the second year makes the error in set modifier expresion
thanks for the answer
Perform this in the script to create a new field
year([DEFAULT DATE]) as Year
that works , thank so much, i have another issue, i need only apears year betwen 2008 and the max, i fixed the data in 8 to make that ,but when i selected a field it shows years like 2000 1998..
if there are more years in the x axis below 2008 i want to dont show only the bars wich value are 2008 or greater