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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX to return Value with the LATEST forecast ID

I am trying to derive the DAX = "Total Latest Forecast" BUT i cannot get the total to sum to 1003 + 3002 +2004 =6009 ....  Instead I get 2004 . Can you help ?

 

Capture.JPG

1 ACCEPTED SOLUTION

Well, there is another solution in this case:

Total Latest Forecast =
SUMX (
    SUMMARIZE (
        Fact_Forecast,
        Fact_Forecast[client],
        "Date", MAX ( Fact_Forecast[fcst cutoffdate] ),
        "Total Forecast", MAX ( Fact_Forecast[Total Forecast] )
    ),
    [Total Forecast]
)

 

m_refaei_0-1627096049096.png

You may redownload the sample file if you want, it is updated.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

excellent.. thank you.. i see by summaring, you are returing only forecast relevant to the max date.. then sum that expression.. 

 

Exactly, simple and straightforward.

Mohammad_Refaei
Solution Specialist
Solution Specialist

You're alomst there, just need to adjust your filter a little.

Total Latest Forecast = 
CALCULATE (
    SUM ( [Total Forecast] ),
    FILTER ( ALLEXCEPT ( Fact_Forecast, Fact_Forecast[client] ),
    [fcst cutoffdate] = MAX ( [fcst cutoffdate] )
    )
)

You may check this sample file

Anonymous
Not applicable

i notice your total = 2004 instead of 6009.... is there a way where it sums up to 6009

 

Capture.JPG

Well, there is another solution in this case:

Total Latest Forecast =
SUMX (
    SUMMARIZE (
        Fact_Forecast,
        Fact_Forecast[client],
        "Date", MAX ( Fact_Forecast[fcst cutoffdate] ),
        "Total Forecast", MAX ( Fact_Forecast[Total Forecast] )
    ),
    [Total Forecast]
)

 

m_refaei_0-1627096049096.png

You may redownload the sample file if you want, it is updated.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.