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
foyiq
Advocate I
Advocate I

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 switch the calculations for two different statuses?
For example, for Third Party Trade Receivables incurred in case of budget I'd use the following measure:

Third Party Trade Receivables inc = CALCULATE(sum('Incurred'[Liabilities Incurred]); 'Incurred'[Counterparty Group]="Third Party"; Incurred'[Category]="Revenue from Sales of Products and Services")

 

For the same indicator but in actual mode I use this measure:

 

Third Party Trade Receivables inc = CALCULATE(sum('Sales'[Revenue]); 'Sales'[Group]="Third Party") + CALCULATE(sum('PL'[Sum]; 'PL'[Item]="Revenue from Services").

 

So, the question is, how could I merge these two measures, so that in the report I could avoid changing the columns on visualizations each time, when I would change the status from actual to budget and vice versa?

 

I tried using IF statement, but my measures are in a separate table which has no relationships with other tables, so it seems not to work.

The status slicer comes in the reports from the related table. The relationships are as follows:

08.06.png

 

Thank you beforehand.

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @foyiq,

 

Could you try the formula below to see if it works in your scenario? Smiley Happy

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

View solution in original post

3 REPLIES 3
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @foyiq,

 

Could you try the formula below to see if it works in your scenario? Smiley Happy

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

sokg
Solution Supplier
Solution Supplier

Check this out https://www.youtube.com/watch?v=jXkGbNDAslo

 

I think your part is after 15:00.

@sokgThank you very much! I will get back to this video in no time.

@v-ljerr-msft Thank you, let me try this. It definitely looks like it's gonna work!

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.