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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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