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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AndradeRobson
Helper II
Helper II

Help me Power Query - Power BI

Dear all, good afternoon!

 

Can you help me.

 

Within Power Query I have an accounting chart of accounts for three companies.

 

CT1_BRANCH      CT1_ACCOUNT
01                         100000000
02                         100000000
03                         1000000000

 

My goal is to create a custom column like this:

 

CT1_BRANCH         CT1_ACCOUNT          Marscara
01                           100000000                 1.00.00.00.00
02                           100000000                 1.00.00.00.00
03                           1000000000                1.0.00.00.0000

 

IF 01 equals 1.00.00.00.00
IF 02 equals 1.00.00.00.00
IF 03 equals 1.0.00.00.0000

 

Could anyone help me convert this within the Power BI Power Query.

 

Att.

Robson

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_2.png

View solution in original post

3 REPLIES 3
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_2.png

Ritaf1983
Super User
Super User

Hi @AndradeRobson 
The logic should be based on CT1_BRANCH or on CT1_ACCOUNT?
The result should be a text data type? ( it doesn't seem like decimal). 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

That. Today the column is already in Text and the result will be text.

This table is from a database and the format of the numbers is without periods or separators.

Note in this same table there are three charts of accounts.

01 - Company A - Account structure 100000000 | 1.00.00.00.00
02 - Company B - Structure of accounting account 100000000 | 1.00.00.00.00
03 - Company C - Structure of accounting account 1000000000 | 1.0.00.00.0000

 

AndradeRobson_0-1699125463408.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.