3 Replies Latest reply on Apr 10, 2018 11:38 AM by Jim Dehner

# Month Function help

Hello,

I wanted to see if someone can help me with the following:

IF MONTH(TODAY()) = 1 then 1.926038182

ELSEIF MONTH(TODAY()) = 2 then 1.832302169

ELSEIF MONTH(TODAY()) = 3 then 1.72878273

ELSEIF MONTH(TODAY()) = 4 then 1.631451752

ELSEIF MONTH(TODAY()) = 5 then 1.544549362

ELSEIF MONTH(TODAY()) = 6 then 1.439391501

ELSEIF MONTH(TODAY()) = 7 then 1.333376522

ELSEIF MONTH(TODAY()) = 8 then 1.261436644

ELSEIF MONTH(TODAY()) = 9 then 1.215191155

ELSEIF MONTH(TODAY()) = 10 then 1.155180116

ELSEIF MONTH(TODAY()) = 11 then 1.091507611

ELSEIF MONTH(TODAY()) = 12 then 1

END

I believe it should be showing a result of 1.631451752  but it returns 122,969

Any help would be greatly appreciated.

Thanks,

Tim

• ###### 1. Re: Month Function help

Hi Time

you say it is returning a value - what is the aggregation that it is using  when it returns the value - i.e. you drag it into the viz and it is going to aggregate the value of the case statement for each of the records that contain that month value

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 2. Re: Month Function help

Hi Jim,

I believe you directed me in the right direction.  I switched from SUM to AVG and it works know.

I'm not sure why the SUM wouldn't work though.  It would only return one number.

Thanks,

Tim