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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rayinOz
Helper III
Helper III

Percent Complete by Cohort in different table

Hello,

 

I'm having trouble coming up with a percent of a total that is in a different table.

 

I have two tables "main" which is a list of course enrolments. and I have "users" which is a list of all users in our system.

 

I have the following measures in my "main" table:

 

Total Enrol = CALCULATE(COUNT(Main[Course Name]))
Total Cohort = CALCULATE(COUNT('trainme-users'[profile_field_employeenumber]),FILTER('trainme-users', 'trainme-users'[profile_field_assignmentgroup]="Casual / Honorary"))
Percent Enrolled = [Total Enrol]/[Total Cohort]

When I put the measures into a visualisation card, the numbers (totals) show correctly. Its when I put the Percent Enrolled measure as a value in the bar chart visualisation where things go wrong.  Most of the chart is showing 100%. 

 

Help! LOL.

Percent Enrolled by Cohort.png

 

 

 

Thanks for any help.

 

Rayinoz

 

 

 

 

 

 

 

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @rayinOz,

 

Could you please mark the proper post as answer if it worked? More about this topic, please feel free to post here.

Best Regards!
Dale

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

Hello,

 

I'm still trying to work the problem. It still isn't working as desired. I'll post another screenshot of what i'm trying to do and I hope that'll help find a good solution. 

 

Ray

v-jiascu-msft
Employee
Employee

@rayinOz

 

Hi, 

 

The context in the visual will influence the outcome of the formula. You could try a measure like this. Please have a try.

 

Total Cohort =
CALCULATE (
    COUNT ( 'trainme-users'[profile_field_employeenumber] ),
    FILTER (
        ALL ( 'trainme-users' ),
        'trainme-users'[profile_field_assignmentgroup] = "Casual / Honorary"
    ),
    ALL ( main )
)

 

 

 

Best Regards!

Dale

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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