Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi Friends

I have a list box with the Year:2004,2005,2006,2007,2008,2010.

but when i select the list box any range of years which means 2005 to 2007 (Or) 2004 to 2008 i need total selected years of sum(sales)

using set analysis can any one help on this.

Regards,

Siva

9 Replies
Anil_Babu_Samineni

Set analysis has that future, No need to create for that

From here, If you select any thing either 2005 - 2007 then Sum(Sales) shows the 2005, 2006 & 2007 Data only. Same with 2004 - 2008

Simple use this -- Sum(Sales)

Or

Sum(TOTAL Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
surendraj
Specialist
Specialist

OR

Sum({$}Sales)

Not applicable
Author

Hi Anil,

For Create a visualization hwre user has to "From Year" and "To Year". A text box should show a message as follows

for example From year 2004 and To year is 2007 the sales between the year of 2004 and 2007

Here is my question

Hope you understand

Thank you vary much

surendraj
Specialist
Specialist

In text box try this..

='For ' & GetFieldSelections(Year,'|') &   'Sale is ' & sum(sale)

or

='For ' & GetFieldSelections(Year,'|') &   'Sale is ' & sum({$}sale)

You can use your delimiter as ,(coma) or pipe...

Kushal_Chawda

in year selection box, provide search option. Click on search and type >=2007 <= 2009 (Make sure that year field is not text) and hit enter. All year in that range will get selected. 

surendraj
Specialist
Specialist

Try with this...its working fine compared to my previous expression..

='The sales between the Year of' & Chr(39)  & SubField(GetFieldSelections(year,'|'),'|') & Chr(39)  & 'To Year'  & Chr(39) & SubField(GetFieldSelections(year,'|'),'|',GetSelectedCount(year)) &'='&sum(sale)

vinieme12
Champion III
Champion III

a simpler Expression would be

=if(GetSelectedCount(Year)>1,'Sales From' & Min(Year) &' to ' & max(Year) & ' is : ') & Sum(Sales)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anil_Babu_Samineni

Vineeth Solution Should work

Still you are looking

='Sales Between the Year of ' & Min(Year) & ' And ' & Max(Year) &  ' Is ' & Sum(Sales)

If solve your issue as you expected, Then close the Thread by flag of Correct answer

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

create 2 varibles ,

vFromYear and vToYear


assign,

vFromYear = 2004

vToYear= 2008

expression,

=sum({<Year={">=$(vFromYear)"},Year={"<=$(vToYear)"}>}Sales)

Muthukumar Pandiyan