Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
What is wrong with this set exression,
=sum({<Month={">=$(=date(addMonths(Max(Month),-1),'MMM YYYY'))"}>}sales)
It's not reflecting with any sales value, its shows me 0 as sales value.
-- Thanks,
Villyee
You are not get proper value in =date(addMonths(Max(Month),-1),'MMM YYYY') what is your expected value let me know.
Can you please share the sample file
With month value you are comparing
Month = MMM YYYY
But month fields values are 1,2,3,4....
What is expected value and output.
Hi anand,
Month field having values as Jan 2014, Feb 2014 and so on.....
so i make formate as MMM YYYY.
- Thanks
Villyee
Then use Year field in the SET expression also.
Hi anand thanks for your reply.
but i didnt understand what the sense of using Year field.
Can you please elaborate me.
- Thanks
Villyee
Hi Villyee,
In script arrive a new date field like this
TableName:
LOAD
*,
MakeDate(Right(MonthFieldName, 4), Match(Left(MonthFieldName, 3), 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')) AS DateFieldName
FROM DataSource;
Now use this expression
=sum({<DateFieldName={">=$(=AddMonths(Max(DateFieldName),-1))"}>}sales)
Hope this helps you.
Regards,
Jagan.