Forum Discussion

foyiq's avatar
foyiq
Advocate I
9 years ago
Solved

Measure calculating from different tables

Dears,   I have two different types of periods - actual and budget. For each I have different source files with absolutely different information. Is it possible to create a measure that would switc...
  • v-ljerr-msft's avatar
    9 years ago

    Hi foyiq,

     

    Could you try the formula below to see if it works in your scenario? :smileyhappy:

    Third Party Trade Receivables inc =
    IF (
        HASONEVALUE ( 'Slicer'[Slicer] );
        IF (
            VALUES ( 'Slicer'[Slicer] ) = "budget";
            CALCULATE (
                SUM ( 'Incurred'[Liabilities Incurred] );
                'Incurred'[Counterparty Group] = "Third Party";
                'Incurred'[Category] = "Revenue from Sales of Products and Services"
            );
            CALCULATE ( SUM ( 'Sales'[Revenue] ); 'Sales'[Group] = "Third Party" )
                + CALCULATE ( SUM ( 'PL'[Sum] ); 'PL'[Item] = "Revenue from Services" )
        )
    )
    

     

    Regards