Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

quastion about aggr calculation?

hi,

i have a quastion about calculation i need to do, i want to calculate for for example:

i have some aggr number for exmple: 40000.

now i want to do calculation for some month, for exp: if its FEBRURY(28 days) and today is the second day of this month(2).

(40000/28)*2.

if its the third(3) day it will be:

(40000/28)*3

i dont know how to do the the exact days of the month(28 days), and each day count.

i think i can do it with COUNT(DD) but i dont sure.

thank you

eran

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     you can get the days by Day(MonthEnd(Date))

    

Celambarasan

View solution in original post

15 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=((Your Aggr expression)/Day(MonthEnd(Today()))) * Day(Today())

Hope this helps you.

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     you can get the days by Day(MonthEnd(Date))

    

Celambarasan

Jason_Michaelides
Luminary Alumni
Luminary Alumni

If you have a value for every day in every month you could use Max(Day).  Or you could simply create an Inline table in your script of each month and the number of days then either join it to the dates table or use ApplyMap() to put the DaysInMonth field wherever you want it.

Hope this helps

Jason

v_iyyappan
Specialist
Specialist

Hi,

     Use the expression like this

     = ((Aggr expressoin * Day(MonthEnd(Today()))) / Day(Today())

Regards,

Iyyappan

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Using Day(MonthEnd(Date)) is a better solution to mine

Not applicable
Author

hi all,

thank you all for the answers i tried everyone of you and this one Day(MonthEnd(Today()))) was almost this but he always give me 31 and not depends on the month i choose.

maybe i dont write it good but Day(MonthEnd(Date)) gives me an error.


Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try Day(MonthEnd(MakeDate(Year,Month,1)))

This assumes you have Year and Month as fields in your data model.

Edit:  Actually, you don't need the '1' in there - Day(MonthEnd(MakeDate(Year,Month)))

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=Day(MonthEnd(Max(YourDateFieldName)))

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Here Date is the date field you have

     Day(MonthEnd(Max(DateField)))

Check it

celambarasan