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
KarolinaZet
Regular Visitor

How to calculate percentage based on two data sources

Hi,

 

I would like to get a measure that will present the percentage of trained stores.

Data is coming from two sources:

KarolinaZet_1-1700219672982.png

 

How to get the following output that I can present in a chart?

KarolinaZet_2-1700219871051.png

 

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

 

 

Anonymous
Not applicable

Hi @KarolinaZet 

1.You can create a calculated table first.

Country=SUMMARIZE(Source2,[Country Name])

 2.Then create a measure

Measure =
VAR a =
    CALCULATE (
        COUNT ( Source1[BAPIBUS1006_HEAD_BPARTNER] ),
        Source1[BAPIBUS1006_ADDRESS-Country] IN VALUES ( Country[Country Name] )
    )
VAR b =
    CALCULATE (
        COUNT ( Source2[Customer ID] ),
        Source2[Country Name] IN VALUES ( Country[Country Name] )
    )
RETURN
    DIVIDE ( b, 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.

Syndicate_Admin
Administrator
Administrator

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Hi,

Please find the link to sample data here >> https://we.tl/t-aE7zUNv63n

 

My desired output should be as follow:

%TRAINED / TOTAL
Belgium33%
Poland60%
Spain75%
Sweden71%
Switzerland33%

 

Based on below data:

TOTALCount of rows
Belgium3
Poland5
Spain4
Sweden7
Switzerland3

 

TRAINEDDistinct Count of rows
Belgium1
Poland3
Spain3
Sweden5
Switzerland1
Anonymous
Not applicable

Hi @KarolinaZet 

I offered a solution above, maybe you can refer it.

 

Best Regards!

Yolo Zhu

 

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.