Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
Please, I am looking for help with creating of matrix from general ledger (accounting).
- I have some accounts used in the general ledger (data source table) where one transaction equals one line where both debit and credit column is used in this line (with different accounts) and the same amount is used for both sides (debit and credit columns at each line).
- Each account can be used both at debit and credit side,
- Amounts can be with both positive and negative sign both at debit or credit side,
- I need to create a matrix where I will have one column with account number (at lines each account appears only once), and sum of debits (column) and sum of credits (column) and the difference between Debit and Credit columns (all for each account used), all to be filtered by date (UMD = debit, UD = credit, Kc = amount valid for both UMD and UD account).
- The source look like this (first column is debit, second column is credit, third column is amount).
The output shall be:
Account; sum of amounts at debit side; sum of amounts at credit side; difference between sum of amounts.
Can you please help?
Thank you
Petr
Solved! Go to Solution.
Hi, @Petrx ;
You could unpivot column in power query ,then create a measure .
1. unpivot in power query.(Selected UMD and UD column then unpivot)
2. create a measure.
Measure = IF(ISINSCOPE('Table'[kind]),SUM([Kc]),SUMX(FILTER('Table',[kind]="UMD"),[Kc])-SUMX(FILTER('Table',[kind]="UD"),[Kc]))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Petrx ;
You could unpivot column in power query ,then create a measure .
1. unpivot in power query.(Selected UMD and UD column then unpivot)
2. create a measure.
Measure = IF(ISINSCOPE('Table'[kind]),SUM([Kc]),SUMX(FILTER('Table',[kind]="UMD"),[Kc])-SUMX(FILTER('Table',[kind]="UD"),[Kc]))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Petrx
When dealing with GL(General Ledger) You need to start grouping the Accounts numbers then use DAX to sum up those accounts Debit & Credit.
Check this out
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
72 | |
56 | |
38 | |
35 |
User | Count |
---|---|
83 | |
68 | |
59 | |
46 | |
45 |