Forum Discussion

orthain's avatar
orthain
New Member
8 years ago

Allexcept from two tables

Hi, 

 

I am trying to solve one issue. I have several tables in my PowerBI and I am trying to create new Measure.

Used tables are:

1) BusinessCase for profit

2) Products for categories

 

The measure should calculate total profit from table BusinessCase no matter to filters except filters from column BusinessCase[OrderDate], BusinessCase[Phase] and Product[Category]

 

I created formula, that works with AllExcept as here: TotalProfit = CALCULATE(SUM(business_case[Profit]); ALLEXCEPT(business_case;business_case[Phase]; business_case[OrderDate]))

 

Could you, please, help me how to add into formula next exception pro Product[Category]? 

 

THX

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You should just be able to add a second ALLEXCEPT function for the Product table.

     

    TotalProfit = CALCULATE(
    	SUM(business_case[Profit]);	
    	ALLEXCEPT(	
    		business_case;	
    		business_case[Phase];
    		business_case[OrderDate]
    	);
    	ALLEXCEPT(
    		Product;
    		Product[Category]
    	)
    )