Forum Discussion
Calculate Percentage from 2 different tables
hi all, I'm trying to calculate weekly compliance percentage of each department for every week coaching session versus the number of personnel present on a particular week. However, the number of coaching session and attendance of personnel is from two (2) different tables.
Example.
Table 1 HR Wk10 # of Coaching Session - 2
Table 2 HR Wk10 # of Personnel Present - 3
Compliance Wk10 = 67%
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Compliance %: = DIVIDE( SUM(coaching_session[session]), SUM(personnel_present[present]) )
4 Replies
- Jihwan_Kim
Super User
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Compliance %: = DIVIDE( SUM(coaching_session[session]), SUM(personnel_present[present]) )- PHEstaciMa1
Helper II
thanks jihwan, it worked... I somehow got the relationship wrong
- v-sgandrathi
Community Support
Hi PHEstaciMa1,
Thank you for confirming, and we’re glad to hear that the solution provided by Jihwan_Kim worked for you. Thank you so much for your answer.
The issue was indeed related to the relationship setup in your model, and once corrected, the calculation returned the expected results.If you encounter any further challenges, please feel free to open a new discussion in the forum.
Thank you.
- Ashish_Mathur
Super User
Hi,
Share the download link of the PBI file. Show the problem there clearly.