Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,
Try this expression
=((Your Aggr expression)/Day(MonthEnd(Today()))) * Day(Today())
Hope this helps you.
Regards,
Jagan.
Hi,
you can get the days by Day(MonthEnd(Date))
Celambarasan
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
Hi,
Use the expression like this
= ((Aggr expressoin * Day(MonthEnd(Today()))) / Day(Today())
Regards,
Iyyappan
Using Day(MonthEnd(Date)) is a better solution to mine
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.
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)))
Hi,
Try this
=Day(MonthEnd(Max(YourDateFieldName)))
Regards,
Jagan.
Hi,
Here Date is the date field you have
Day(MonthEnd(Max(DateField)))
Check it
celambarasan