Alteryx Designer Desktop Discussions

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

Quantity of Days

Seba
7 - Meteor

I need to add an extra column with the quantity of days for each month in order to calculte the average amount of revenue for each rig.

Column "Date" is in date time format.

 

Any ideas?

 

2024-01-15_11-52-40.jpg

 

Thanks!

5 REPLIES 5
cjaneczko
13 - Pulsar

You should be able to use the following formula.

 

 

 

datetimediff(DateTimeTrim([Date],'lastofmonth'),DateTimeTrim([Date],'firstofmonth'),'days')

 

 

*Edited. There was an error in the original formula. This one should now work.

Raj
14 - Magnetar

There are multiple ways to do this 
1- using find and replace 

2- Formula tool
3- Others as well ( but did not want to complicate it.)

find and relpce will be very easy here.

Raj
14 - Magnetar

Formula tool makes this dynamic for any year
please find attached
Make done if this solve the problem.

Seba
7 - Meteor

Thanks a lot! it worked!

just added +1 at the end of the formula in order to get the correct quantity of days

 

Regards,

Seba

Seba
7 - Meteor

Thanks Raj, I check on this and also worked!

 

Labels