Forum Discussion

B_Ed1978's avatar
B_Ed1978
New Member
3 years ago
Solved

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 (J...
  • Jihwan_Kim's avatar
    3 years ago

    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] )
            )
        )
    )