Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview Sum for <= vMaxMonth

I have a variable vMaxMonth which holds the maximum month based on the selection.

I want to use set analysis to find sum of amount for all values <= vMaxMonth.

I am using

sum({<Month={'<=$(vMaxMonth)'}>} amount)

But it does not give the desired results.

Request to guide what is wrong in my expression.

5 Replies
teiswamsler
Partner - Creator III
Partner - Creator III

Hi tripti

I cant quite get what you are after, maybe this can help.

This set analysis is to calulate current month to date (MTD), based on current selection i filters.

OrderDate is numerisk.

Sum( {<
CalenderYear,
CalenderMonth,
CalenderQuater,
%OrderDate = {">=$(=num(MonthStart(Max(%OrderDate))))<=$(=Max(%OrderDate))"}
>}
Sales )

/Teis

tresesco
MVP
MVP

This could be because of mismatch in Month data format., i.e. - your Month field might have data like 'Jan', 'Feb',... while your variable has numeric value. So you have to get them in sync. Try to share your problem app with sample data.

sasiparupudi1
Master III
Master III

Fieldnames are case sensitive and

put $(vMaxMonth) in a text object to see what value it is returning and compare it with the Month Values and they should both be in the same format

hth

Sasi

Not applicable
Author

Thanks everyone, the issue is resolved. My expression was correct and it was issue with the other condition I was using.

teiswamsler
Partner - Creator III
Partner - Creator III

Hi Tripti

Remember to close the trend.

Have a good day.

/Teis