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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Wrong calculation of course attendance when showing the range of Financial Years

Hi, 

First of all, when I select each FY, the course attendance is correctly reflected but when I select the whole FYs from FY13 to FY21, the course attendance shown in the combo chart is not correct.

You can see the two combo charts:

If I select FY21, the course attendance will be 12% but when I select the whole range of FYs from FY13 to FY21, the course attenance is 8%. I understand why I make a mistake and it got something to do with the wrong DAX calculation.

zxavierdeloitte_1-1610001022855.pngzxavierdeloitte_0-1610000994197.png

 

I have set up a simple DAX formula to calculate the course attendance:

 

Course attendance = ([Total no of program attendees]/[Total no of employees])

Total no of program attendees refers to the no of program attendees attended any programs in that particular FY

Total no of employees refers to the no of employees in that particular FY.

 

So, when I select FY21, total no of program attendees is 60 while the total no of employees for that FY21 is 500, so the course attendance will be 60/500 (for example) is 12%.

 

But when I select the all FYs, the total no of program attendees remains 60 but the total no of employees (FY13 to FY21 meaning employees are employed or resign from the firm) became 750 for example so the course attendance will be 8%. In this case, it is wrong and it should reflect 12% for FY21 even if I select the whole range of FYs. I need to change the DAX formula so that once I select the whole range of FYs, the course attendance for particular FY should be correctly reflected.

 

Thanks

 

6 REPLIES 6
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Would you please inform us more detailed information( your

 sample pbix  (by OneDrive for Business)) if possible? Then we will help you more correctly.

 

Please do mask sensitive data before uploading.

 

Thanks for your understanding and support.

 

Best Regards,

Dedmon Dai

 

 

amitchandak
Super User
Super User

@Anonymous , DISTINCTCOUNT can only differ in view bys, Not here(same view/group) . Can change this visual to table and have this column added and check is it really changing with filter. I doubt I can help much with a sample data.

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Anonymous , Share the formula of

Total no of employees

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

 

Thanks. I have added in the sample data for your information. As for the table "No of employees", I don't understand why I keep on getting wrong value of total no of employees per year. This table is the replica of the actual table but my original table shows the correct value of no of employees. Perhaps you can take a look at it. 

 

By the way how do I share the pbx with you? I could not find any insert icon for me to attach pbi workbook.

 

Employee table

zxavierdeloitte_0-1610069131425.png

zxavierdeloitte_4-1610069238077.png

 

 

Attendee table

zxavierdeloitte_1-1610069183467.png

zxavierdeloitte_3-1610069223141.png

 

Attendance rate

zxavierdeloitte_5-1610069262600.png

 

Results

 

You can see that the results for the total no of employees are not correct. 

zxavierdeloitte_6-1610069278368.png

 

 

Anonymous
Not applicable

Total no of employees = DISTINCTCOUNT('Active employees'[Email Address])
Anonymous
Not applicable

@amitchandak 

Hi I have already attached the sample data for your request. Pls let me know if you need any clarification.

 

THanks

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors