Forum Discussion
How to calculate percentage in row
- 8 years ago
Hi ericbi
Please add the following three calculated measures to your model
Total Win = COUNTROWS(FILTER('Table1','Table1'[Status]="Y"))Count of Quote No. = COUNTROWS('Table1')% of Win = DIVIDE([Total Win],[Count of Quote No.])
Format that last measure as a percent and drag all three to a table visual using the Full Name field and it should work.
| Sold price | Sold cost | Sold Gp |
| 160868 | 92219 | |
| 38036 | 17586 | |
| 29990 | 18331 | |
| 92020 | 63195 | |
| 200800 | 162859 | |
| 425282 | 122059 | |
| 201630 | 134364 |
I have to calculate the Percentage in each rows as based on the formula (As sold price - as sold cost)/as sold price . As I am new to the Power Bi pls let me know how to achieve this
- Ashish_Mathur5 years ago
Super User
Hi,
Assuming the picture you posted is that of a visual (and not of your source data) and that Sold Price and Sold Cost are measures, write this measure
GP % = divide([Sold Price]-[Sold cost],[Sold price])
Hope this helps.
- Anonymous5 years agoNot applicable
Actually, it's a column. but I have converted it as a measure. now it's working as expected. Thank You
- Ashish_Mathur5 years ago
Super User
You are welcome. If my reply helped, please mark it as Answer.