cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
magb621 Frequent Visitor
Frequent Visitor

Divide aggregate values by different denominators dependent on column value

Hello, 

 

I have created a table which aggregates the sum of Units, Call, and Accounts based on Campaign. I'm trying to display a conversion value where the calculation is dependent on the Campaign. 

 

If the Campaign is Radio, the conversion formula is: Units / Calls

If the Campaign is Print, the conversion formula is: Units / Accounts

 

It seems that my attempts at the Conversion column evaluate each row and fails because many rows include 0 in the Calls or Accounts column. I'd like to just divide by the aggregated value of Calls or Accounts. Any ideas?

 

CampaignUnits SoldCallsAccountsConversion
If Radio, Units / Calls
If Print, Units / Accounts
Radio1002003500.5
Print20020010000.2

 

Thank you!

Maggie

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
magb621 Frequent Visitor
Frequent Visitor

Re: Divide aggregate values by different denominators dependent on column value

I solved this by adding a new column = to sum of calls if the campaign is Print and sum of accounts in the the campaign is Radio. I then used this column as the denominator in my divide by function and used a sum aggregation on the column containing the divide function. 

View solution in original post

1 REPLY 1
Highlighted
magb621 Frequent Visitor
Frequent Visitor

Re: Divide aggregate values by different denominators dependent on column value

I solved this by adding a new column = to sum of calls if the campaign is Print and sum of accounts in the the campaign is Radio. I then used this column as the denominator in my divide by function and used a sum aggregation on the column containing the divide function. 

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors