Month as number for calculation

I am trying to create a report which use current month as period. I was wondering if there is a way to pick month convert it number for calculation. Does anyone tried it before?

Samples below

Current month CM = July
CM = 7

Calculation
Month Cover = 10 months volume / CM + 3

Welcome to PUG @Jeriel.

I am unsure on answering your question directly, but maybe you can do a different calculation using the {period_count} functionality in custom mode found on this page?

Check out this thread, there is currently no system driven way to provide this, only way is to add a stream - but doing that gives more flexibility.

My stream is hopefully going to be as follows:

Thanks

Regards,
Jeriel Gangoso

Hi,

Aside from the {PERIOD_DAYS}, there is a hidden gem where you can use case statements in Custom formulas. Below is an example where I need to get sales for the last weekday using a SQL function to drive the logic:

^CASE WHEN DATENAME(weekday,GETDATE()) = ‘Monday’ THEN {a} ELSE {b} END

{a} = sales for yesterday - 2
{b} = sales for yesterday

You could do something similar if there are no better methods.

Cheers,
John

1 Like

thanks

Regards,
Jeriel Gangoso