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
Sagar01
New Member

Dynamic Total Count Percentage

Hello everyone,

I'm reaching out regarding the provided matrix, where I'm aiming to calculate the percentage change in opportunities based on the total count of countries. This involves utilizing two interconnected tables: the Accounts table, which holds billing country data, and the Opportunities table, which contains information on opportunity status.

The columns used are Account[Billing Country] and Opportunity[Stage] in the row section, and Count of Opportunity[Stage] in the value section of the matrix.

To illustrate, for the "W0-Close Won" category, I aim to calculate the percentage by dividing 2 (representing the number of opportunities) by 11 (representing the total count of countries), resulting in 18.18%.

Could someone please assist me in achieving this?


Can someone plese help in achiving the same?

 

Sagar01_0-1706180962370.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sagar01 

Please refer to the following solution.

1.Create a measure to calculate count of stage.

Total Opportunities= Count(Opportunity[Stage])

2. Create another measure to calculate %

% Opportunities =
VAR a =
    CALCULATE (
        [Total Opportunities],
        FILTER (
            ALLSELECTED ( Account ),
            [Billing Country] IN VALUES ( Account[Billing Country] )
        )
    )
RETURN
    DIVIDE ( [Total Opportunities], a )

Best Regards!

Yolo Zhu

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

 

Best Regards!

Yolo Zhu

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
Sagar01
New Member

The sructure is like Accounts table is connected to Opportunity table in one to many relationship and we are getting Billing Country from accounts table

Sagar01_0-1706521982755.png

 

 

Anonymous
Not applicable

Hi @Sagar01 

Please refer to the following solution.

1.Create a measure to calculate count of stage.

Total Opportunities= Count(Opportunity[Stage])

2. Create another measure to calculate %

% Opportunities =
VAR a =
    CALCULATE (
        [Total Opportunities],
        FILTER (
            ALLSELECTED ( Account ),
            [Billing Country] IN VALUES ( Account[Billing Country] )
        )
    )
RETURN
    DIVIDE ( [Total Opportunities], a )

Best Regards!

Yolo Zhu

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

 

Best Regards!

Yolo Zhu

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

Anonymous
Not applicable

Hi @Sagar01 

You can refer to the following measure.

1.Create a measure to calculate count of stage.

 

Total Opportunities= Count(Opportunity[Stage])

 

2. If your Opportunity table have the country column, if it exists,the following measure use the country column in  Opportunity table Create another measure to calculate %

 

% Opportunities =
VAR a =
    CALCULATE (
        [Total Opportunities],
        FILTER (
            ALLSELECTED ( Opportunity ),
            [Billing Country] IN VALUES ( Opportunity[Billing Country] )
        )
    )
RETURN
    DIVIDE ( [Total Opportunities], a )

 

Best Regards!

Yolo Zhu

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.