Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a text box to show SUM(Sales) for selected MonthYear lets say Mar-18.
Now I need another text box that shows SUM(Sales) for Oct-17??
Lets say user selected Jan-18 the second text box has to show total for Jul-17.
I tried MonthYear-6 it is not working
Any help is appreciated,
Try
Date(Addmonths(Date#(Max(MonthYear),'MMM-YY'),-6),'MMM-YY') in a text box and see if it return six months back yearmonth value. if it does then use the below set analysis
(sum({<MonthYear={"$(=Date(Addmonths(Date#(Max(MonthYear),'MMM-YY'),-6),'MMM-YY'))"}>}if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Earned Sales])))
-
(sum({<MonthYear={"$(=Date(Addmonths(Date#(Max(MonthYear),'MMM-YY'),-6),'MMM-YY'))"}>}[Claims Paid])
+
sum({<MonthYear={"$(=Date(Addmonths(Date#(Max(MonthYear),'MMM-YY'),-6),'MMM-YY'))"}>}if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Sales Pending])))
Hi rs su, the final expression can be different based on the data model and the available fields,in example, if you have a field like:
Date(MakeDate(Year(date), Month(date)), 'YYYYMM') as YearMonth
The expression can be like:
Sum({<YearMonth={"$(=Date(AddMonths(Max(YearMonth), -6), 'YYYYMM'))"}, Year, Month>} Sales)
Sorry not working.
Can you share sample app?
Try This,
Sum({<Date={'>$(=AddMonths(Max(Date),-6))'}>} Sales)
Can you share your data or app?
(sum(if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Earned Sales])))-(sum([Claims Paid])+sum(if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Sales Pending])))
This is my expression in text box for current year which is showing right lets say Jan-18, I need the same expression for six months old data Jul-17 in another text box
(sum(if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Earned Sales])))-(sum([Claims Paid])+sum(if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Sales Pending])))
This is my expression in text box for current year which is showing right lets say Jan-18, I need the same expression for six months old data Jul-17 in another text box
(sum(if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Earned Sales])))-(sum([Claims Paid])+sum(if(not match([Vehicle Make],'*HITACHI','*NEWMAN'),[Sales Pending])))
This is my expression in text box for current year which is showing right lets say Jan-18, I need the same expression for six months old data Jul-17 in another text box
Hi RS,
Its pretty much simple. Just use two expression.
1. =Sum({<CalMonthYear={"$(=Monthname(addmonths(Max(CalDate),-6)))"}>} Sales)
It is for calculating the last 6 month sales
2. =Sum({<CalMonthYear={"$(=Monthname((Max(CalDate))))"}>} Sales)
It is for calculating the current month sale.
Regards,
Ajay