Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sunb1
Frequent Visitor

using if and sumx in a calculated measure to only calculate where all data exists

I am analyzing M&A data. For most companies in my table, I have fees incurred by the Acquirers and Targets, from the year before the deal to two years after the deal. I would like to calculate the fees the Acquirer incurred in year 2 post-deal, and as a percent of the combined Acquirer + Target fees the year before the deal. While the math is simple, i need to create a measure that will assess each row in my table and only run this calculation where data is available for all entities (Acquirer and Target) and for all the years involved. I created measures of "Total Fees" for each entity and for each year. Below is the calculated measure i used to run the needed calculation row by row, but I don't think it is corrrect.  Can anyone help?

 

 

 

2yrs post/pre = CALCULATE( if ([Acquirer Fees PreDeal]>0 && [Target Fees PreDeal]>0 && [Survivor Fees 2yrs Post Deal]>0, DIVIDE([Survivor Fees 2yrs Post Deal], sumx(DealDATA, [Acquirer Fees PreDeal]+[Target Fees PreDeal]), 0)))

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi,@sunb1 

  You may try to use calculate to change the context when use sumx function ,It needs data sample to Concrete analysis,

So could you please share your pbix or the data sample and expected output.

You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.