Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last Month Units - Set Analysis

Hi all,

I'm trying to show the number of units sold for last month using set analysis. My expression I have is below which I thought would work but doesn't.

Any help would be much appreciated.

sum({<UNIT.SOLD_MONTH = {"$(=month(addmonths(today),-1))"}>} UNIT.TOTALSOLD)

Thanks

Gareth

1 Solution

Accepted Solutions
PradeepReddy
Specialist II
Specialist II

try like this...

Sum({<UNIT.SOLD_MONTH = {"$(=Date(AddMonths(Today(),-1),'MMM-YY'))"}>} UNIT.TOTALSOLD)

View solution in original post

13 Replies
sunny_talwar

I think you are missing open and close parenthesis for Today() function. Try this:

Sum({<UNIT.SOLD_MONTH = {"$(=Month(AddMonths(Today(),-1)))"}>} UNIT.TOTALSOLD)

Anonymous
Not applicable
Author

Well spotted Sunny T but it hasn't solved the problem unfortunately.

Thanks

sunny_talwar

There was also missing parenthesis at the end. Have you tried copy pasting the expression I have posted above?

Anonymous
Not applicable
Author

Yes I've copied and pasted your expression it's still blank?

sunny_talwar

Can you share the values within UNIT.SOLD_MONTH

sasikanth
Master
Master

hi,

UNIT.SOLD_MONTH is Text or Number?

did you check it?

Anonymous
Not applicable
Author

Hi,

Unit.Sold_Month is in the format MMM-YY

PradeepReddy
Specialist II
Specialist II

try like this...

Sum({<UNIT.SOLD_MONTH = {"$(=Date(AddMonths(Today(),-1),'MMM-YY'))"}>} UNIT.TOTALSOLD)

MayilVahanan

Hi

Try like this

Sum({<UNIT.SOLD_MONTH = {"$(=Date(AddMonths(Today(),-1),'MMM-YY'))"}>} UNIT.TOTALSOLD)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.