Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chloe19
Contributor III
Contributor III

SUM MAX DATE - for Previous Month when NULL

Hi all 

I am new to Qlik Sense, have a pretty basic question when it comes to an expression.

I am trying to sum data from the previous month and I have the below code which works:

  • SUM({<[MONTH/YEAR] = {"$(=Date(MonthStart(Max([MONTH/YEAR]), -1), 'MMM-YYYY'))"}>} TRANSACTION)

However, a dimension can be null so I have the below, which also works

  • num(sum({<Region_Name={'*'}>} TRANSACTION),0)

My problem is, how do I combine them to show me the transaction for the previous month using the last dot point.

So how do I put point two into point one?

Thank you for any and all assistance 

Labels (4)
1 Reply
Digvijay_Singh

I don't know the actual need but multiple set conditions in AND mode are written like this..

SUM({<[MONTH/YEAR] = {"$(=Date(MonthStart(Max([MONTH/YEAR]), -1), 'MMM-YYYY'))"},Region_Name={'*'}>} TRANSACTION)