Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
my req is
i have a listboxs year and sales
now i am seeing chart sum(sales) based on year
year:
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
my req is if i click on any year then i want see sales from that year to next 3 years
for ex
if i click on 2002 then i want see for 2002,2003,2004,2005
how to write set analysis for this ?
SUM({$<year = {">=$(=Max(year)-3)<=$(=Max(year))"}>}sales)
This will work:
sum({<Year={">=min(Year)<= $(=min(Year)+3)"}>} Sales)
(If you don't select anything, it will show from 1999)
SUM({$<year = {">=$(=Min(year))<=$(=Min(year)+3)"}>}sales)
no it is not working
its giving all years data if i selected any year also
It works, I tested. Upload your app to see what's wrong.
Edit: My bad, mistyped, missed $( =min(Year) ) for the min(Year)
hi its working manish great you are always.
in the same way i want in reverse order like
selection to efore 3 months
SUM({$<year = {">=$(=Max(year)-3)<=$(=Max(year))"}>}sales)
Michael's solution should work for you, but if not then it's a data model issue. Try to associate the date in your fact table to your master date table by creating an allias of same name.
hii
try this expression
sum({$<year = {">=$(=Min(year))<=$(=Min(year)+3)"}>}sales)