Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I currently have a formula that I'm annualizing by multiplying by 12. However, to be more accurate I'd like to incorporate a "Days in Month / Days in Year" based off of the "TapeDate" that is in the data so that it's dynamic.
Current formula:
Solved! Go to Solution.
Hello @dashmarley11
Please try bellow measure and let me know if it worked the way you wanted to! 🙂
If it didn't work please share sample data or extra information.
Measure2 =
VAR CurrentDate = MAX('Deposits'[TapeDate])
VAR DaysInMonth = DAY(EOMONTH(CurrentDate, 0))
VAR DaysInYear = YEARFRAC(DATE(YEAR(CurrentDate), 1, 1), DATE(YEAR(CurrentDate), 12, 31)) * 365
VAR AdjustmentFactor = DaysInMonth / DaysInYear
RETURN
IFERROR((SUM('Deposits'[CLC_Withdrawal]) / SUM('Deposits'[AvgBook])) * AdjustmentFactor * 12, 0)
Hello @dashmarley11
Please try bellow measure and let me know if it worked the way you wanted to! 🙂
If it didn't work please share sample data or extra information.
Measure2 =
VAR CurrentDate = MAX('Deposits'[TapeDate])
VAR DaysInMonth = DAY(EOMONTH(CurrentDate, 0))
VAR DaysInYear = YEARFRAC(DATE(YEAR(CurrentDate), 1, 1), DATE(YEAR(CurrentDate), 12, 31)) * 365
VAR AdjustmentFactor = DaysInMonth / DaysInYear
RETURN
IFERROR((SUM('Deposits'[CLC_Withdrawal]) / SUM('Deposits'[AvgBook])) * AdjustmentFactor * 12, 0)
Hi @dashmarley11
Please check the below code. Assuming the year starts from 1st Jan and ends on 31st Dec. If not, please update the date in YearStart and YearEnd in the formula.
If not work, please share sample data in Excel format and post the expected result
Measure2 =
VAR CurrentDate = MAX('Deposits'[TapeDate])
VAR DaysInMonth = DAY(EOMONTH(CurrentDate, 0))
VAR YearStart = DATE(YEAR(CurrentDate), 1, 1)
VAR YearEnd = DATE(YEAR(CurrentDate), 12, 31)
VAR DaysInYear = COUNTROWS(DATES(YearStart, YearEnd))
RETURN
IFERROR(
(SUM('Deposits'[CLC_Withdrawal]) / SUM('Deposits'[AvgBook])) * (DaysInYear / DaysInMonth),
0
)
Proud to be a Super User! | |