This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello,
I have the following table:
| ENTRY | ACCOUNT | DEBIT | CREDIT |
| 14 | 220 | 49.560,39 | 0,00 |
| 14 | 220 | 128.471,87 | 0,00 |
| 14 | 220 | 215.794,91 | 0,00 |
| 14 | 222 | 0,00 | 49.560,39 |
| 14 | 222 | 0,00 | 128.471,87 |
| 14 | 222 | 0,00 | 215.794,91 |
| 14 | 220 | 49.560,39 | 0,00 |
| 14 | 220 | 128.471,87 | 0,00 |
| 14 | 220 | 215.794,91 | 0,00 |
| 14 | 410 | 0,00 | 49.560,39 |
| 14 | 472 | 0,00 | 128.471,87 |
| 14 | 410 | 0,00 | 215.794,91 |
| 15 | 220 | 10.000,00 | 0,00 |
| 15 | 220 | 80.000,00 | 0,00 |
| 15 | 222 | 0,00 | 10.000,00 |
| 15 | 222 | 0,00 | 80.000,00 |
What I want to obtain is the result of adding the amounts of the debit column of the account 220 and subtracting the amounts of the credit column of the account 222 that have the same number of entry.
Thank you very much and best regards.
Solved! Go to Solution.
Hello @Anonymous ,
You can use the following DAX to get the desired output
HI @Anonymous ,
If your problem is solved then please give the kudos.
Thanks
I can think of a simple way to achieve this, if your data has always debit on account 220 and credit on account 222. This would be to create a measure "Total" = Debit - Credit. After, you can create a table visualization, filter by these account numbers and add in values your entry numbers and your total.
If what you are trying to do is finding any entries with balance this should work
AV
Hello @alexvc ,
Thank you for your helping.
What I want to do is a measure that adds up the total amount of the differences of each account, entry by entry. In this example, it would be to calculate the difference in the entry 14 and in the entry 15 and add the two amounts.
Entry 14: Sum of 220 account is 787.645,34 and sum of 222 account is 393.827,17 and the difference is 393.827,17.
Entry 15: Sum of 220 account is 90.000,00 and sum of 222 account is 90.000,00 and the difference is 0,00.
Total sum is 393.827,17.
Thank you and best regards.
Hello @Anonymous ,
You can use the following DAX to get the desired output
@Anonymous ,
Just add the measure below.
Measure =
CALCULATE ( SUM ( Table1[DEBIT] ), Table1[ACCOUNT] = 220 )
- CALCULATE ( SUM ( Table1[CREDIT] ), Table1[ACCOUNT] = 222 )
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 30 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 53 | |
| 31 | |
| 23 | |
| 23 |