Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am preparing a dashboard for compare profit and loss for this year vs last year.Depend on the year selection I want to display current period and last year same period in the other column but it doesn't seems to work.
Can someone give me a hand on this?
Thank you
Harsh
See the attached file
sum({<Year={$(=Max(Year)-1)},Period=>}Amount)
Try that.
I have tried that. it didn't work.
Please check Year-Over-Year comparisons.
HIC
There was extra "=" and you don't want to have that "Period=" there as it ignores all selections from Period dimension.
it is working.
Hi Harsh,
Please find the attached QVW file for solution.
Regards,
@vi
Create 2 Expressions:
1) For Current Year
num(Sum({<Year={$(=max(Year))},Month={"<=$(=max({<Year={$(=max(Year))}>} Month))"}>}Sales),'#,##0')
2) For Previous Year Same Period
num(Sum({<Year={$(vLastYr)},Issue_Date={"<=$(=date(SetDateYear((today()-1),max(Year-1)), 'DD-MM-YYYY'))"}, Month >}Sales),'#,##0')
Where vLastYr=max(Year)-1 (Create a variable)
The Data will change as per the Selections done in the Year List Box.
Hope that fulfills your requirement.
Regards
Aviral Nag
Current period : sum({<Period={$(=Max(Period))}>}Amount)
last year same period: sum({<Period={$(=Max({<Year={$(=Max(Year)-1)}>}Period))}>}Amount)
hope this helps
See the attached file