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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mike35
Frequent Visitor

Calculating a percentage between two tables

Hi all,

 

Trying to calculate a percentage between two tables with the below coding, and struggling to get an ouput. Wondered if anyone can point me in the direction of where I am going wrong?

 

I'm looking to generate a completion percentage per area, of staff completing a form. In essence two tables, first table ('Quiz Results') is the output of the form whereby staff are selecting the area they are based in during the form completion [Area]. Second table ('Staff Base') is a staff list with a field for the location the staff are based in [Base_Name].

 

AreaCompletion% = 
DIVIDE(
    CALCULATE(
        COUNTROWS('Quiz Results'),
        'Quiz Results'[Area] = "London"
    ),
    CALCULATE(
        COUNTROWS('Staff Base'),
        'Staff Base'[Base_Name] = "London"
    )
)

 

When applying to a card I'm just getting a blank output. Expected output would be 56.48%, as we have 431 responses with an area of "London" where there are 763 staff with a Base_Name of "London".

 

Thanks

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Mike35 Measure for the count of quiz results per area:

QuizResultsCount = COUNTROWS('Quiz Results')

 

Measure for the count of staff per base:

StaffCount = COUNTROWS('Staff Base')

 

Measure to calculate the completion percentage:

DAX
AreaCompletion% =
DIVIDE(
[QuizResultsCount],
[StaffCount]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Mike35 Measure for the count of quiz results per area:

QuizResultsCount = COUNTROWS('Quiz Results')

 

Measure for the count of staff per base:

StaffCount = COUNTROWS('Staff Base')

 

Measure to calculate the completion percentage:

DAX
AreaCompletion% =
DIVIDE(
[QuizResultsCount],
[StaffCount]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks @bhanu_gautam 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.