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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
palchaw
Frequent Visitor

Divide all attributes into specific attribute value

Hello,

 

I am creating a balance sheet financial statement output that shows line items with their actual values for each of the past three years. I need to add in a percentage column that shows how much of each attribute makes up the Total Assets. My current matrix looks like the below.

 12/31/202112/31/202212/31/2023
Entity 123   
Cash343
Inv425
AR577
PPE556
Other455
Total Assets212326

 

All data is in one table "Financials" with an Attribute column that contains the descriptions of the line items (Cash, Inv, AR, etc.) and a Value column that holds the respective value for each attribute. There's also an ID column in the Financials table as there are different entities' financial statements held in the same table. 

The above table does not display data until a company in a separate matrix visual is clicked on.

 

My ideal output would look similar to the below.

Attribute12/31/2021 12/31/2022 12/31/2023 
Entity 123      
Cash314%417%312%
Inv419%29%519%
AR524%730%727%
PPE524%522%623%
Other419%522%519%
Total Assets21100%23100%26100%

 

 

I have tried the below measure to try to have the value for "Total Assets" as a denominator which I could then divide into, but this measure only shows the value for the "Total Assets" attribute row for each year, while every other attribute's row is blank.

 

__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        'Financials'[Attribute] = "Total Assets")
1 ACCEPTED SOLUTION
vicky_
Super User
Super User

To fix your measure (keeping the same dataset), i would do something like:

__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        ALL('Financials'[Attribute]),
        'Financials'[Attribute] = "Total Assets"
        )

Is there any reason you have total assets as an attribute? if you get rid of the total assets attribute, and your data looks like:

vicky__0-1719529537630.png

then you can just remove that last line:

__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        ALL('Financials'[Attribute])
        )

 

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

To fix your measure (keeping the same dataset), i would do something like:

__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        ALL('Financials'[Attribute]),
        'Financials'[Attribute] = "Total Assets"
        )

Is there any reason you have total assets as an attribute? if you get rid of the total assets attribute, and your data looks like:

vicky__0-1719529537630.png

then you can just remove that last line:

__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        ALL('Financials'[Attribute])
        )

 

This measure helped, thank you.

At first, it was still coming up with the blank error where the measure only populated a value for "Total Assets" when I tried this on my live data that looks similar to the example data in my forum question. So I recreated the example data in my file and your measure worked perfectly. I ended up building my live table from scratch and found that when I did a custom sort on Attribute by a different column "Sort ID", that's when the measure went blank. I found a link (https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-us...) that explained the "Sort ID" column would have to be added into the ALL() function in order for the measure to populate correctly for all attributes.

Thanks!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.