cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

## percentage

Hi everyone I am trying to find the cash percentage refund total in the following table in Power Bi, could someone please help with the formula, please

 Ticket Total Sales Percent Refund 5-15 £210.00 48.00% £100.80 16-20 £520.00 75.00% £390.00

1 ACCEPTED SOLUTION
Super User

Hi @pb14 ,

To calculate for each row in Power Query it would be:

``[Refund] / [Total Sales]``

To calculate over the whole table as a DAX measure would be:

``````DIVIDE(
SUM(yourTable[Refund]),
SUM(yourTable[Total Sales]),
0
)``````

Pete

Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!

4 REPLIES 4
Regular Visitor

Hi Pete thanks for this sorry the refund bit was what I am trying to find, I should have explained it better. so would it be

``````DIVIDE(
SUM(yourTable[percent]),
SUM(yourTable[Total Sales]),
0
)``````

to find the refund value over the table

Super User

Yes. When applied as a measure this calculation will give you the total refund percent of sales over the whole table.

When you add further dimensions to the same visual (e.g. department etc.) it will auto-aggregate over just those added dimensions.

Pete

Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!

Super User

Hi @pb14 ,

To calculate for each row in Power Query it would be:

``[Refund] / [Total Sales]``

To calculate over the whole table as a DAX measure would be:

``````DIVIDE(
SUM(yourTable[Refund]),
SUM(yourTable[Total Sales]),
0
)``````

Pete

Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!

Regular Visitor

Thank you for all your help Pete

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

#### Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors