Forum Discussion

Lattelin's avatar
Lattelin
Frequent Visitor
5 years ago
Solved

Idea to model Win% vs Discount%

Hi everyone,

 

I have a table with two columuns. One of them has a "Discount %" column and the other one has an outcome of either "Closed Won" or "Closed Lost". It looks similiar to below. I want to make a report that tracks the win% vs the discount % and I was wondering if anyone had any recommendations on what type of graph or metric to use. Also, how would I start about doing this, would I have to do some type of statistical technique, make a measure, etc? Open to any ideas. Thanks. 🙂 

 

Discount Percent     Outcome

 

20%                        Closed Won

10%                        Closed Won

30%                        Closed Won 

15%                         Closed Lost. 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Lattelin ,

     

    If you just want to calculate the  percentage of the number of "Won"  and all rows, you could use the following formula to create a measure:

    win% = 
    var _t=ADDCOLUMNS('Table',"Type",SUBSTITUTE([Outcome],"Closed ",""))
    RETURN COUNTX(FILTER(_t,[Type]="Won"),[Outcome]) / COUNTROWS('Table')

    Then use a Card visual to display it:

    Or if you want to show the Discount% and Win% in visuals such as Stacked column chart, I suggest you enter a new table for X-axis:

    And then create a measure like this:

    Measure = SWITCH(MAX('ForVisuals'[X-axis]),"Win%",[win%], "Discount%", SUM('Table'[Discount Percent]))

    The final output is shown below:

    If these do not make any sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Lattelin ,

     

    If you just want to calculate the  percentage of the number of "Won"  and all rows, you could use the following formula to create a measure:

    win% = 
    var _t=ADDCOLUMNS('Table',"Type",SUBSTITUTE([Outcome],"Closed ",""))
    RETURN COUNTX(FILTER(_t,[Type]="Won"),[Outcome]) / COUNTROWS('Table')

    Then use a Card visual to display it:

    Or if you want to show the Discount% and Win% in visuals such as Stacked column chart, I suggest you enter a new table for X-axis:

    And then create a measure like this:

    Measure = SWITCH(MAX('ForVisuals'[X-axis]),"Win%",[win%], "Discount%", SUM('Table'[Discount Percent]))

    The final output is shown below:

    If these do not make any sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.