If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi,
I want to compute the sum of amount of the previous month year from the max month year. I have a MonthYear column in my data of this format: Jun 2021, Jul 2021, Aug 2021 etc.
My expression is not detecting any MonthYear and I'm not sure what is wrong.
Expression: Sum({<MonthYear={"$(=Date(AddMonths(Max(MonthYear)),-1),'MMM YYYY')"}>}Amount)
Can someone help please. Thank you.
Hi @LLing,
Make sure that your field Monthyear has the proper data type required for the AddMonth function.
Or try below
Create this field in the script and use this in the expression.
Date(MakeDate(left(Monthyear,3), right(Monthyear,4), 1), 'MMM-YYYY') as Date
Hi @LLing,
Make sure that your field Monthyear has the proper data type required for the AddMonth function.
Or try below
Create this field in the script and use this in the expression.
Date(MakeDate(left(Monthyear,3), right(Monthyear,4), 1), 'MMM-YYYY') as Date
Hi @abhijitnalekar ,
I'm able to resolve my issue based on your inputs. Thank you so much!
Great!!.. You are welcome