Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

month comparison

Hi

I am trying to compare the month of a date dd/mm/yyyy to a variable vMonth, which will contain the name of a month eg feb.

I want to be able to average all the sales where the month = vMonth.

I've played around with set analysis where I've tried to select the set where the month is = to vmonth but had no luck.

avg({$< Month(Date) = {'$(vMonth)'}>} sales)

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

avg({$<MonthField = {'$(vMonth)'}>} sales)

Edit:

if you don't have month field, load in script like this

Load * , month(Date) as MonthField from tablename;

Hope it helps

Thanks & Regards,
Mayil Vahanan R

View solution in original post

1 Reply
MayilVahanan

HI

Try like this

avg({$<MonthField = {'$(vMonth)'}>} sales)

Edit:

if you don't have month field, load in script like this

Load * , month(Date) as MonthField from tablename;

Hope it helps

Thanks & Regards,
Mayil Vahanan R

View solution in original post