Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
hkusulja
Frequent Visitor

How to create hierarchy for Chart of Accounts

Hello,

I am using latest Power BI Desktop and have Power Query returning the data from table with all G/L Accounts (aka Chart of Accounts). (I am using Dynamics 365 Business Central, v20 SaaS, but it can also be Excel as a source)

 

I need help to create standard accounting perspective for hierarchy on Chart of Accounts so it can be used within Power BI report as standard hierarchy.

 

The hierarchy should be based on row account type (posting, heading, begin-total, end-total) and totaling info.

 

Data is simple, example:

 

No.NameAccount TypeTotaling
10000BALANCE SHEETHeading 
10001ASSETSBegin-Total 
10100Checking accountPosting 
10110Mercury - Checking - MainPosting 
10200Saving accountPosting 
10210Mercury - Savings - MainPosting 
10300CashPosting 
10400Accounts Receivable domesticPosting 
10410Accounts Receivable foreignPosting 
10500Prepaid ExpensesPosting 
10550Freight expensePosting 
10700Inventory merchandisePosting 
10750Inventory resale servicePosting 
10770Inventory materialPosting 
10800EquipmentPosting 
10900Accumulated DepreciationPosting 
10990TOTAL ASSETSEnd-Total10001..10990
20001LIABILITIESBegin-Total 
20100Accounts Payable domesticPosting 
20110Accounts Payable foreignPosting 
20200Purchase DiscountsPosting 
20300Purchase Returns & AllowancesPosting 
20400Deferred RevenuePosting 
20500Credit CardsPosting 
20550Loan from shareholdersPosting 
20570Franchise Tax Fee LiabilityPosting 
20600Sales Tax PayablePosting 
20650Use Tax Payable (Reverse Charge Purchases)Posting 
20700Accrued Salaries & WagesPosting 
20800Federal Withholding PayablePosting 
20900State Withholding PayablePosting 
21000FICA PayablePosting 
21100Medicare PayablePosting 
21200FUTA PayablePosting 
21300SUTA PayablePosting 
21400Employee Benefits PayablePosting 
21500Vacation Compensation PayablePosting 
21550Employees PayablePosting 
21600Garnishment PayablePosting 
21700Federal Income Taxes PayablePosting 
21800State Income Tax PayablePosting 
21900Notes PayablePosting 
30100Capital StockPosting 
30200Retained EarningsPosting 
30290This Year EarningsTotal40000..69995
30300Distributions to ShareholdersPosting 
30990TOTAL LIABILITIESEnd-Total20001..30990

 

 

Or, if this is not possible based on Totaling type, then what about 1 expands/drill downs all 10..19 , and then 100.. expands all 100., however not G/L Accounts have the same number of characters/numbers...

2 REPLIES 2
hkusulja
Frequent Visitor

I belive I need to create using Power Query (M langage) additional columns, so I can make level 1, level 2 and level 3 columns.

Does needs to be calculated based on No. column. example:

L1catetogory = select first character substr(0,1) , and filter whole table, sort a-z, and then select first (name) value

L1catetogory = select first 2 characters substr(0,2) , and filter whole table, sort a-z, and then select first (name) value

 

then i will be able to use create hierarchy correctly.

 

I want resolution in Power Query and not DAX due to other reasons..

v-jianboli-msft
Community Support
Community Support

Hi @hkusulja ,

 

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario? Please provide more details about the results you want, such as how does the hierarchy look like.

Besides, you can create hierarchy in the field pane:

vjianbolimsft_1-1660788022040.png

Here are some documents that may helps you, please refer to:

What a Power BI Hierarchy Is, and How to Use it? - RADACAD

Power BI Hierarchy: How-to Create Hierarchy in Power BI | Stoneridge Software

Create a matrix visual in Power BI - Power BI | Microsoft Docs

Add multiple fields to a hierarchy slicer - Power BI | Microsoft Docs

 

Best Regards,

Jianbo Li

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

 

 

Helpful resources

Announcements
Europe Fabric Conference

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 Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.