Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
101 | |
90 | |
79 | |
70 | |
70 |
User | Count |
---|---|
112 | |
96 | |
96 | |
75 | |
72 |