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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.