Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi @rajasekar_o ,
I created a sample pbix file(see the attachment), please find the details in it.
1. Add a index column in Power Query Editor
2. Create a measure as below to get the closing balance
closing balance =
VAR _index =
SELECTEDVALUE ( 'Table'[Index] )
RETURN
CALCULATE (
SUM ( 'Table'[credit] ) - SUM ( 'Table'[debit] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Index] <= _index )
)
Best Regards
Hi @rajasekar_o ,
I created a sample pbix file(see the attachment), please find the details in it.
1. Add a index column in Power Query Editor
2. Create a measure as below to get the closing balance
closing balance =
VAR _index =
SELECTEDVALUE ( 'Table'[Index] )
RETURN
CALCULATE (
SUM ( 'Table'[credit] ) - SUM ( 'Table'[debit] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Index] <= _index )
)
Best Regards
Share sample pbix file to help you.
I have debit credit data only i want to calculate closing balance
User | Count |
---|---|
101 | |
90 | |
79 | |
70 | |
70 |
User | Count |
---|---|
112 | |
96 | |
96 | |
75 | |
72 |