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

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.

Reply
B_Ed1978
New Member

totals help

Hi There I have a measure where if I don't have an actual I use a forecast, this measure works well at the monthly level , but I am not sure why I can't get my total to work.  Actuals - $8,335,806 (Jul to Oct), Forecast - $19,854,201 (Nov to Jun) Total should be $28,190,007 for col ACT/FCT

 

My formula is 

ACT / FCT =
var actuals = sumx('FY23 Data','FY23 Data'[ACT])
var forecast = sumx('FY23 Forecast','FY23 Forecast'[FCT])
var result = if(actuals=blank(),forecast,actuals)
return
result
B_Ed1978_0-1668743190409.png

 

Thanks All

 
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.

 

ACT / FCT =
SUMX (
    DISTINCT ( 'TableName'[Period Month] ),
    CALCULATE (
        IF (
            SUMX ( 'FY23 Data', 'FY23 Data'[ACT] ) = BLANK (),
            SUMX ( 'FY23 Forecast', 'FY23 Forecast'[FCT] ),
            SUMX ( 'FY23 Data', 'FY23 Data'[ACT] )
        )
    )
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@B_Ed1978 Posting so hopefully you will vote for the idea.

First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.

 

ACT / FCT =
SUMX (
    DISTINCT ( 'TableName'[Period Month] ),
    CALCULATE (
        IF (
            SUMX ( 'FY23 Data', 'FY23 Data'[ACT] ) = BLANK (),
            SUMX ( 'FY23 Forecast', 'FY23 Forecast'[FCT] ),
            SUMX ( 'FY23 Data', 'FY23 Data'[ACT] )
        )
    )
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thankyou so much this worked 👍

amitchandak
Super User
Super User

@B_Ed1978 , try like

 

ACT / FCT =
var actuals = sumx('FY23 Data','FY23 Data'[ACT])
var forecast = sumx('FY23 Forecast','FY23 Forecast'[FCT])
var result = sumx(Values(Table[Period]) , calculate( if(actuals=blank(),forecast,actuals)) )

return
result

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

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.