Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I want to calculate previous and current year comparison.
i have tried set expression like below
without variables
=sum({< Year = {"$(=max(Year)-1)"}>} value)
=sum({< Year = {"$(=max(Year))"}>} value)
with variables
v_previousyear=max(year)-1
v_maxyear= max(year)
sum({< Year = {"$(=$(v_previousyear))"}>} value)
sum({< Year = {"$(=$(v_maxyear))"}>} value)
but all the expressions are giving same results.like its is giving current year results for all the expressions.
where did i do mistake.please help me out to solve this.
thanks in advance
kavitha
Hi Kavitha, maybe it's just a typo but your variables has Year all in lowercase: "year". Field name are case sensitives, it should be "Year".
also there is the option that you are doing selections in another field related with year, like a [Year_Month] field, or a [Date] field, in that case you need to include in set analysis all fields that are filtering data in one year.
To ignore selections in one field you only need to inlcude the name of the field in set analysis:
sum({< Year = {"$(=$(v_previousyear))"}, Month_Year>} value)
Additional contions can/should be added to use the month or date selected by user.
Is this resolved?
yes shivesh
I corrected myself it is working fine.
Thanks and regards
Kavitha