Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
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
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