Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
User12321
Contributor III
Contributor III

Previous Month Year from Max Month Year

Hi,

I want to compute the sum of amount of the previous month year from the max month year.

Can someone help please. Thank you.

Labels (1)
1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

Hi @User12321,

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

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

3 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @User12321,

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

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
User12321
Contributor III
Contributor III
Author

Hi @abhijitnalekar ,

I'm able to resolve my issue based on your inputs. Thank you so much!

abhijitnalekar
Specialist II
Specialist II

Great!!.. You are welcome

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!