Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Partner - Contributor III
Partner - Contributor III

how to get previous month results based on selection


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,


1 Reply
Partner - Contributor III
Partner - Contributor III


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,