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
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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.