Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts ,
I have 3 main filters Environment , year and Month..
3 type of environemtns , 3 different years , and 12 months --- need to show the sales
1. if one Env , 1 year and 1 month selected then I have to show last 3 months of sales including the selected month.
2. if one Env , 1 year and more than one month selected then I have to show only selected months data.
3. if one Env , different years and same month selected then I have to show only selected months data based on the years selected.
4. if one Env , Different Years and different Months selected then I have to show only selected months data based on the years selected.
5. Different Env , same year , same month then show the data as per the filter selection...
6.
7.
8.
Etc Like this we will get several combinations , am trying to achive this by if condition but its came to know that its not the correct way to do. I think this can be achieved using set analysis....
Please provide your solution , and also please find the attachment for clear understanding...
already using set expression using month field to get the last 2 months of data.
Please respond with your solutions using set analysis.
Thanks in advance...
Best Regards,
V.
Seems to be only 1st requirement needs rolling 3 months calculation. rest are simple expression with out set analysis.
if( getselectedcount(Env)=1 and getselectedcount(Yr)=1 and getselectedcount(Mon)=1 ,
sum(value) , // regular with out set analysis
sum({<Mon={"<=$(=Max(Mon)>=$(=Max(Mon)-3)"}>}value) // Set analysis make sure that use right date function to exact date format with Mon field
)