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
amaddala
Helper I
Helper I

Percentage mix for multiple dimensions

I am trying to show percentage mix for various dimensions in my visuals. Since I have a lot of items under each category, calculating percentage mix for each of them is not ideal.

For example, the below image visual 1 is Power BI feature that gives % of grand total, what I am trying to achieve is visual 2. 

I am manually achieving this using the DAX query for this. However there are a lot of visuals and lot of categories in my report. So I am trying to find a way to dynamically achieve this.   

Visual.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amaddala ,

 

According to my understanding, you want to calculate the % of each type(NAK,Failure, Success) under each category(2021-w22,2021-w23...), right?

 

You could use the following formula to create measures:

Sum Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( 'Table', 'Table'[Cate] = MAX ( 'Table'[Cate] ) )
)
nak Measure =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER (
            'Table',
            'Table'[Type] = "NAK"
                && 'Table'[Cate] = MAX ( 'Table'[Cate] )
        )
    ),
    [Sum Measure],
    0
)
Failure Measure =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER (
            'Table',
            'Table'[Type] = "Failure"
                && 'Table'[Cate] = MAX ( 'Table'[Cate] )
        )
    ),
    [Sum Measure],
    0
)
Success Measure =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER (
            'Table',
            'Table'[Type] = "Success"
                && 'Table'[Cate] = MAX ( 'Table'[Cate] )
        )
    ),
    [Sum Measure],
    0
)

The final output is shown below:

2.2.1.1.PNG

 

 

Please take a  look at the pbix file here.


Best Regards,
Eyelyn Qin
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

3 REPLIES 3
Anonymous
Not applicable

Hi @amaddala ,

 

According to my understanding, you want to calculate the % of each type(NAK,Failure, Success) under each category(2021-w22,2021-w23...), right?

 

You could use the following formula to create measures:

Sum Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( 'Table', 'Table'[Cate] = MAX ( 'Table'[Cate] ) )
)
nak Measure =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER (
            'Table',
            'Table'[Type] = "NAK"
                && 'Table'[Cate] = MAX ( 'Table'[Cate] )
        )
    ),
    [Sum Measure],
    0
)
Failure Measure =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER (
            'Table',
            'Table'[Type] = "Failure"
                && 'Table'[Cate] = MAX ( 'Table'[Cate] )
        )
    ),
    [Sum Measure],
    0
)
Success Measure =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER (
            'Table',
            'Table'[Type] = "Success"
                && 'Table'[Cate] = MAX ( 'Table'[Cate] )
        )
    ),
    [Sum Measure],
    0
)

The final output is shown below:

2.2.1.1.PNG

 

 

Please take a  look at the pbix file here.


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

amitchandak
Super User
Super User

@amaddala ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

On every measure on the visual, you can right click on the visual in the visualization pane and use % of total

Percent of total.png


Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Updated my question, please let me know if the question is clear

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.