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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
PKPK90
Helper I
Helper I

Formula for Projecting Monthly Financial Targets

Hello, I'm trying to create a formula that will show the AmountUSD for past dates within the current month (the table only has data up to today). For the remaining days of the month, I want to display the average (TARGET - (Total Amount USD)) / remaining days in the month.

Currently, the formula works only partially correctly. It displays the AmountUSD, but it also shows the average for past data, which I don't want. The future data should show how much we need to send on average per day to achieve the target.

I have 3 tables.

Calendar = CALENDAR(MIN('sil CDM_GL'[Transaction_Date]),EOMONTH(TODAY(),0))

sil CDM_GL with Site, Date and AmountUSD

Target with Site and Total (target)

 

Calendar is connected to sil CDM_GL on Date = Date

Target is connected to sil CDM_GL by Site

 

M_AmountUSD =

CALCULATE(
    SUM('sil CDM_GL'[Amount(USD)]),
    RELATEDTABLE('Calendar')
)
+

VAR TodayDate = TODAY()
VAR StartOfMonth_ = DATE(YEAR(TODAY()), MONTH(TODAY()), 1)
VAR EndOfMonth_ = EOMONTH(TodayDate, 0)
VAR TotalAmountThisMonth =
    CALCULATE(
        SUM('sil CDM_GL'[Amount(USD)]),
        DATESBETWEEN(
            'Calendar'[Date],
            StartOfMonth_,
            EndOfMonth_
        )
    )
VAR TargetTotal =
    CALCULATE(
        SUM('Target'[Total]),
        DATESBETWEEN(
            'Calendar'[Date],
            StartOfMonth_,
            EndOfMonth_
        )
    )
VAR DaysInMonth =
    DAY(EndOfMonth_)
VAR DaysRemaining =
    DaysInMonth - DAY(TodayDate)
RETURN
    IF(SELECTEDVALUE('Calendar'[Check])=TRUE(),0,
    IF(
        DaysRemaining > 0,
        DIVIDE(TargetTotal - TotalAmountThisMonth, DaysRemaining, BLANK()),
        0
    ))

 

PKPK90_0-1713510306338.png

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.