Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate the sum of values of previous month data depends on the current month selection,,,
PeriodName field consist of jan,2008,feb200
Sum ({$<PeriodName={$(#PeriodN)}>}Values)
i used this expression with the help option to get previous year values,,,PeriodN is the variable but it shows the current selected month and also nt showing values ,
i assigned PeriodN=PeriodName in input box proper,,,
i need sum values to be calculated for previous month....pls help me out,,thanks in advance
Rod Jager wrote:=FIELDVALUE('PeriodName', FIELDINDEX('PeriodName', ONLY(PeriodName))-1)
Rod,
This technique requires that the periods were loaded in perfect ascending order, correct?
-Rob
Hi Rob,
Yes, good point, the data needs to be in the correct order - isn't everyones 😉 ?
Rod
Hi,
adding multiple expression its showing error in expression.Pls correct with the below condition.
if i select field values in PeriodName...it should display the sum of values related to that field.
if i select field values in SemName..it should display the sum of values related to that field.
Hi btechrames,
If you want the calculation to be conditional then consider using the GetSelectedCount function or similar to evaluate if any elements have been selected from either the PeriodName or SemName fields and then apply logic accordingly.
As an (untested) example:
IF(GETSELECTEDCOUNT(PeriodName)=1 AND GETSELECTEDCOUNT(SemName)=0,
Sum ({$<PeriodName={'$(=FIELDVALUE('PeriodName', FIELDINDEX('PeriodName', ONLY(PeriodName))-1))'}>}Values),
IF(GETSELECTEDCOUNT(PeriodName)=0 AND GETSELECTEDCOUNT(SemName)=1,
Sum ({$<SemName={'$(=FIELDVALUE('SemName', FIELDINDEX('SemName', ONLY(SemName))-1))'}>}Values),
0
))
Not very elegant but I hope this helps.
Rod