Forum Discussion

Adams_Apple's avatar
Adams_Apple
Frequent Visitor
1 year ago
Solved

IF statement calculating both values

I am trying to use an IF statement to use values from two different tables. The first table contains actual production data and the second contains projections for future numbers. This is used in a m...
  • suparnababu8's avatar
    suparnababu8
    1 year ago

    Hi Adams_Apple 

     

    Th's good to hear the measure is working for you! In order to works sum of total correct, you may use SUMX function to iterate over the table and calculate total sum correctly. Give a try with the below measure.

     

    Projected_BinsPacked =
    SUMX(
        VALUES('Date'[Date].[Month]),
        CALCULATE(
            COALESCE(SUM('Bins'[Bins Packed]), MAX(Projections[Bins Packed])))
    )

     

    Let me know if it works.

     

    Thank you!