Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
Please let me know how to write a set expression for the sales for last Date, month, Quarter, Year.
If i select the Month then text object should be display the Last month sales and again if select the date of that month it should display the last date sales in one text object..How to write expression for one go.
the below expression working fine but i need the same for Quarter and month and Date. how to inlcude all these in below expression.
Count({<Month=, Year=, Date={">=$(=MonthStart(AddMonths(Max(Date),-1)))<=$(=MonthEnd(Max(Date)))"}>}Types).
Thanks in advance.
Kumar
Try using drill-down group in set analysis.
Hi Kumar,
Check this link which will help you what you want to achieve.
Date Level Analysis - WTD, MTD, QTD & YTD (Current Year & Previous Year)
Thanks for your suggestion Vishwa,
I referred those document which are very useful for calculating the YTD,QTD expression.
Here my scenario is i need to show all these expressions in one text object. Here am attaching the file.
Thanks in advance.
Hi,
if i understood correctly you need to have all of these expressions in the same text object.
You can work with chr(13) and & like this:
='Week:'&Count({<Date={">=$(=WeekStart(Max(Date)))<=$(=WeekEnd(Max(Date)))"}>}Sales) &Chr(13)&
'Week:'&sum({<Month=, Year=,Quarter=,Week=, Date={">=$(=WeekStart(Max(Date),-1))<=$(=WeekEnd(Max(Date),-1))"}>}Sales)&Chr(13)&
'Date:'&sum({<Date={"$(=Date(Max(Date)-1))"}>}Sales)