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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
th340385
Helper I
Helper I

New Column

Hello - I currently have a chart of accounts table that includes financial statement roll up description at the bottom of the same table (see screenshot below). I am trying to include a new column (blue) that includes the financial statement roll up description for each account. Any guidance on how to accomplish this would be appreciated! 

 

Account #DescriptionTotaling RangeNew Column Expectation
100000Cash 1 = Total Cash and Cash Equivalents
100001Cash 2 = Total Cash and Cash Equivalents
100002Cash 3 = Total Cash and Cash Equivalents
193000.1Land = Total Fixed Assets
193000.2Land Improvements = Total Fixed Assets
193000.25Accum. Depr. - Land Improvements = Total Fixed Assets
193000.3Building = Total Fixed Assets
193000.35Accum. Depr. - Buildings = Total Fixed Assets
100999Total Cash and Cash Equivalents099999.000..100999.000 
196999Total Fixed Assets193000.000..196999.000 
1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @th340385 ,

 

1. Split [Totaling Range] column

ff2.PNG

Then you can get such a table.

ff3.PNG

2. Create a table like this.

Table = 
SUMMARIZE(
    FILTER(
        Sheet1,
        Sheet1[Totaling Range1] <> BLANK()
    ),
    [Account #], [Description], [Totaling Range1],[Totaling Range2]
)

ff4.PNG

3. Create a measure like this.

Measure 2 = 
VAR x = 
SWITCH(
    TRUE(),
    MAX(Sheet1[Account #]) >= MIN('Table'[Totaling Range1]) && MAX(Sheet1[Account #]) <= MIN('Table'[Totaling Range2]), MIN('Table'[Description]),
    MAX(Sheet1[Account #]) >= MAX('Table'[Totaling Range1]) && MAX(Sheet1[Account #]) <= MAX('Table'[Totaling Range2]), MAX('Table'[Description])
)
RETURN
IF(
    CONTAINSSTRING( MAX(Sheet1[Description]), "Total"),
    BLANK(),
    x
)

ff5.PNG

(Note: Do not establish a relationship between the two tables.)

 

Best regards,
Lionel Chen

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

View solution in original post

5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @th340385 ,

 

1. Split [Totaling Range] column

ff2.PNG

Then you can get such a table.

ff3.PNG

2. Create a table like this.

Table = 
SUMMARIZE(
    FILTER(
        Sheet1,
        Sheet1[Totaling Range1] <> BLANK()
    ),
    [Account #], [Description], [Totaling Range1],[Totaling Range2]
)

ff4.PNG

3. Create a measure like this.

Measure 2 = 
VAR x = 
SWITCH(
    TRUE(),
    MAX(Sheet1[Account #]) >= MIN('Table'[Totaling Range1]) && MAX(Sheet1[Account #]) <= MIN('Table'[Totaling Range2]), MIN('Table'[Description]),
    MAX(Sheet1[Account #]) >= MAX('Table'[Totaling Range1]) && MAX(Sheet1[Account #]) <= MAX('Table'[Totaling Range2]), MAX('Table'[Description])
)
RETURN
IF(
    CONTAINSSTRING( MAX(Sheet1[Description]), "Total"),
    BLANK(),
    x
)

ff5.PNG

(Note: Do not establish a relationship between the two tables.)

 

Best regards,
Lionel Chen

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

Can you please provide an example? 

jthomson
Solution Sage
Solution Sage

Just seems like a simple if statement to me

Can you please provide example? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.