cancel
Showing results for
Search instead for
Did you mean:
Helper I

## Dax help

Hello World,

I have two pics here. One in excel (blue color) and anothetr in Power Bi.  I have created a matrix in Power Bi with age category and transactions.

Now I want to calculate the sucess rate . The formula that I used in Excel is : Sum(Total Transactions/Total Past Dues 1-30 Days)*100%) . Same with the remaining 3 . How do i do same in power bi?
Please help

1 ACCEPTED SOLUTION
Community Support

Hi @Timbuktu7 ,

I think you can try code as below to create a measure.

``````Payment success Rate =
VAR _Total =
SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Transactions] )
VAR _Transactions =
CALCULATE ( SUM ( 'Table'[Transactions] ) )
RETURN
DIVIDE ( _Transactions, _Total )``````

My Sample:

Result is as below.

Best Regards,
Rico Zhou

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

2 REPLIES 2
Community Support

Hi @Timbuktu7 ,

I think you can try code as below to create a measure.

``````Payment success Rate =
VAR _Total =
SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Transactions] )
VAR _Transactions =
CALCULATE ( SUM ( 'Table'[Transactions] ) )
RETURN
DIVIDE ( _Transactions, _Total )``````

My Sample:

Result is as below.

Best Regards,
Rico Zhou

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

New Member

var Total_transaction = sum(Transaction) return

rate = ( Transaction / Total_transaction ) * 100

return rate

I hope that help you, good luck 🙂

## Helpful resources

Announcements

#### Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

#### Power BI March 2023 Update

Find out more about the March 2023 update.

#### March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors
Top Kudoed Authors