Forum Discussion

trine_norris's avatar
trine_norris
Frequent Visitor
6 years ago

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

  • 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.

     

  • 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])

    • trine_norris's avatar
      trine_norris
      Frequent Visitor

      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? 🙂

       

      • parry2k's avatar
        parry2k
        Super User

        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.