Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I am trying to write a measure for this particular case for one of my KPI i.e.
sum({<ReportMonth={$(=addmonths(MAX(ReportMonth),-1))}>}[sales])/100
wherein I want to sum the sales for last month..
here Reporting month is in data format dd.mm.yyyy.
but this is not working could some one please help me out for this issue ?
I am geeting this as error :Error in set modifier ad hoc element list: ',' or ')' expected
Regards
Iras
Perhaps this
sum({<ReportMonth={"$(=Date(AddMonths(Max(ReportMonth),-1),'DD.MM.YYYY'))"}>} sales)/100
Dear Mr. Anil babu,
Thanks for your reply but it didn't work out. I found other soultion for it.
sum({<ReportMonth={$(=num(addmonths(MAX(ReportMonth),-1)))}>}[sales])/100
The problem was It has to convert to num rather than date.
Maye be
you can create variable MaxDate as :
=Date(Max(Date#(ReportMonth,'DD.MM.YYYY')))
then your formula :
=Sum({<ReportMonth = {"$(=Date(addmonths('$(MaxDate)',-1),'DD.MM.YYYY'))"}>} [sales])/100
Perhaps this
sum({<ReportMonth={"$(=Date(AddMonths(Max(ReportMonth),-1),'DD.MM.YYYY'))"}>} sales)/100
Dear Mr. Anil babu,
Thanks for your reply but it didn't work out. I found other soultion for it.
sum({<ReportMonth={$(=num(addmonths(MAX(ReportMonth),-1)))}>}[sales])/100
The problem was It has to convert to num rather than date.