Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
kavitha_kommise
Partner - Contributor III
Partner - Contributor III

how to get previous month results based on selection

hello,

i have requirement to show previous month results based selection,

if i select April then it has to show mar results how can i achieve

can any one help me to built set expression

thanks and regards,

kavitha

1 Reply
kavitha_kommise
Partner - Contributor III
Partner - Contributor III
Author

hello,

i have built a set expression like this

i am getting month based on selection previous month but aggregation is not happening.

it is returning 0 though i have value.

Sum({<DATE = {"=MonthName(DATE) = MonthName(AddMonths(max(DATE), -1))"}>}IN_CHARGE)<DATE = {"=MonthName(DATE) = MonthName(AddMonths(max(DATE), -1))"}>}IN_CHARGE)

MonthName(AddMonths(max(DATE), -1))--this is giving previous month based on selection.

sum({<DATE = {"=MonthName(DATE) = MonthName(Today(), -1)"}>}IN_CHARGE)----this expression working statically

i want set expression in such a way based on current month selection it has to show previous month results.

please help on same

thanks in advance,

kavitha