Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am three expression say:
RollingMonth as a dimension
PreviousMonth_CurrentYear =sum({<RollingMonth={'$(=VPM)'}>} SalesAmount)
CurrentMonth_CurrentYear =sum({<RollingMonth={'$(=VCM)'}>} SalesAmount)
CurrentMonth_PreviousYear =sum({<RollingMonth={'$(=VCM)'}>} SalesAmount)
where as variable are
VPM= =MonthName(AddMonths(max(SalesDate),-1))
VCM= =MonthName(max(SalesDate))
VCMLY= MonthName(AddMonths(max(SalesDate),-12))
Can I merge these 3 expression into 1 expression by using Pick,Match,WildMatch function etc.
Regards,
Balraj
See if this expression helps:
=Sum({<RollingMonth={'$(=VPM)', '$(=VCM)', '$(=VCMLY)'}, Month = , Year = >} Sales)
Output With no selection:
With Year and Month Selection:
Is this close to what you want?
Take this as:
CurrentMonth_PreviousYear =sum({<RollingMonth={'$(=VCMLY)'}>} SalesAmount)
Sure you can, but what will decide which expression to show? A list box?
You can make flags in back end and used in front end...
I need to show all the expression on the base of current selection.
Say, If I have selected Jan 2015, then it shoud show me
Jan 2015,
Dec 2014,
Jan 2014
sales.....
Can you try this (Not sure if this will work, but no harm in trying )
=Sum({<RollingMonth={'$(=VPM)', '$(=VCM)', '$(=VCMLY)'}>} SalesAmount)
How I can create Flag at backend for all these..
Say I am having Transaction_ Date..
On what basis I can create a flag??
Not working
Check if this is what you want:
Flags will be static...
You want dynamic on the basis of selection..so you can make variables and used it on your expression.
You want one expression to be calculated for all the three logic ???
then,
Hope the below expression will help you..
=sum({<RollingMonth={'$(VCMLY)','$(VCM)','$(VPM)'}>}Sales)