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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
trine_norris
Frequent Visitor

Find Max ROI By Dynamic Group

Hi everyone,

I have a table that looks something like this: 

YearChannelInvestmentRevenue
2017Social10003000
2017Search200500
2017TV400015000
2018Social12003500
2018Search5001200
2018TV300010000

 

In the Report, the user is able to select and deselect the different channels and years.

I then have a visual that displays the overall ROI for the selected channels in the specific years. 

Further, the visual should display the overall maximum ROI by year (e.g. the ROI for the selected channels). 

So if you select TV and Social and the years 2017-2018, the overall ROI will be 3,4 (15000+10000+3500+3000)/(1000+4000+1200+3000).

 

However, I am having problems creating a measure to calculate the maximum ROI by year. To my knowledge, I would need a dynamic table which calculates the aggregated ROI for the selected channels by year, e.g. Something like this:

 

YearInvestment (for selected channels)Revenue (for selected channels)ROI
20175000180003,6
20184200135003,2

 

In this case, the measure should then return 3,6.

 

Can anyone help creating this?


Thanks

5 REPLIES 5
amitchandak
Super User
Super User

@trine_norris , I am not clear Max ROI.

So ROI is


roi= divide(sum(table[revenue]),sum(table[investment]))

 

So if want to know max roi by channel by year

Max roi Channel = maxx(summarize(Table, Table[year], table[channel], "_1",[roi]),[_1])

Thanks for your replies!

 

ROI is revenue/investment

however the ROI for two (or more) channels, is not just the ROI summed up. Instead you need to recalculate it, based on the aggregated investment and revenue. 

 

Therefore the issue is that i cannot precalculate ROI, as it depends on the selected channels (where i have around 20).

So i would need a dynamic table, where i can calculate a dynamic ROI based on the selected channels. 

 

Makes sense? 🙂

 

@trine_norris what is not working the solution posted above?

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi, 

 

The max ROI should always be found for all years, not just the selected ones. 

And it still seems as though it calculates the ROI for each channel, and not aggregated. 

parry2k
Super User
Super User

@trine_norris I'm really not sure what is the issue here, add this measure and check

 

 

ROI = DIVIDE ( SUM ( Table[Investment] ), SUM ( Table[Revenue] ) )

MAX ROI = MAXX ( VALUES ( Table[Year] ), [ROI] )

 

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.