Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Formula that changes based on the month

Hali3
7 - Meteor

So I have a spreadsheet that takes (1/3, 2/,3 3/3) of a number depending on the month. for example: (January = 100 * .33)  (February = 100 * .66)  (March = 100 * 1). This cycle goes on for all 4 quarters of the year. 

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @Hali3 

 

You can use a if else block in a formula tool for this. Like below.

 

IF month = "January" Then 100 * .33

ELSEIF month = "February" Then 100 * .66

ELSE 100 * 1 ENDIF

 

Example is attached.

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Hali3
7 - Meteor

If there a way to make a formula that includes Jnuary, April, July, October in one group. Feb etc. in another group?

atcodedog05
22 - Nova
22 - Nova

Hi @Hali3 

 

You can modify the formula like below

 

 

IF month in ("January","April","July","October") Then 100*.33

ELSEIF month in ("February") Then 100 * .66

ELSE 100 * 1 ENDIF

 

Months in the bracket is grouped together.

 

Output:

atcodedog05_0-1603730486216.png

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @Hali3 

 

Cheers and Happy Analyzing 😀

Labels
Top Solution Authors