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
Anonymous
Not applicable

Data transformation

Hi, 

 

I would need help on the following:

1. Convert nos. into billions. Some of them are in millions and some in billions. I would need to convert only millions to billions.

2. Calculate percentage of total for serial title. Records here are tagged to Assets and Liabilities. I would need to find serial title of an asset as a percentage of total assets. Let us say bank credit as % of total assets.

 

Satya_04_0-1679551499634.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

My Sample:

vrzhoumsft_0-1680081458907.png

Calculated column:

Convert to Billions = 
IF('Table'[units] = "Billions of U.S. Dollars",'Table'[value],'Table'[value]/1000)

Measure:

Percentage Grouped by banks for Asset = 
VAR _Total =
    CALCULATE (
        SUM ( 'Table'[Convert to Billions] ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[banks] ),
            'Table'[series_title] = "Total Assets"
        )
    )
VAR _Value =
    CALCULATE (
        SUM ( 'Table'[Convert to Billions] ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[series_title], 'Table'[banks] ),
            'Table'[A/L] = "Asset"
        )
    )
RETURN
    DIVIDE ( _Value, _Total )

Result is as below.

vrzhoumsft_1-1680081503515.png

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
Anonymous
Not applicable

@amitchandak Please help

Anonymous
Not applicable

Hi @Anonymous ,

 

My Sample:

vrzhoumsft_0-1680081458907.png

Calculated column:

Convert to Billions = 
IF('Table'[units] = "Billions of U.S. Dollars",'Table'[value],'Table'[value]/1000)

Measure:

Percentage Grouped by banks for Asset = 
VAR _Total =
    CALCULATE (
        SUM ( 'Table'[Convert to Billions] ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[banks] ),
            'Table'[series_title] = "Total Assets"
        )
    )
VAR _Value =
    CALCULATE (
        SUM ( 'Table'[Convert to Billions] ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[series_title], 'Table'[banks] ),
            'Table'[A/L] = "Asset"
        )
    )
RETURN
    DIVIDE ( _Value, _Total )

Result is as below.

vrzhoumsft_1-1680081503515.png

Best Regards,
Rico Zhou

 

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

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.