HI All,
I have following table
month, sales
jan,200
feb,400
mar,750
apr,900
may,1023
jun,1200
I want to show sales difference in Text box . if i select march it should show difference from march sales to feb sales,if i select jun it should show it should show difference from jun to may.based on current it should display.please help me.
Regards
Anji
Hello,
Use following expression to calulate the sales difference for current month and previous month based on selection
Sum({$<Month={$(=Max(Months))}>}sales) - Sum({$<Month={$(=Max(Months)-1)}>}sales)
Regards,
Vikas
Do you have year, date fields too? If yes, try to share some data/app with such data.
You can Show it with the Help of Two Text Box for current and Previous month using the Set Analysis
Sum({$<Month={$(=Max(Months))}>}sales) // For Current Selection
Sum({$<Months={$(=Max(Months)-1)}>}Sales) // For Previous month
Hello,
Use following expression to calulate the sales difference for current month and previous month based on selection
Sum({$<Month={$(=Max(Months))}>}sales) - Sum({$<Month={$(=Max(Months)-1)}>}sales)
Regards,
Vikas
Hi Anji,
Refer to the attached sample, best way to derive using master calendar and set analysis method, (real time u should have data in date format with historical period so u have to update this expression).
Fact:
load * Inline [
month, sales
jan,200
feb,400
mar,750
apr,900
may,1023
jun,1200];
[Month Sort]:
load * inline [
monthno,month
1,jan
2,feb
3,mar
4,apr
5,may
6,jun];