Forum Discussion
Calculation based on two fact tables
Hi all,
I have a question regarding a calculation based on two fact tables.
In one fact table A there is: Date - Employee ID - Name - Number of employees at the end of the month. In the other fact table B there is Date - Employee ID - Name - Bonus Received Yes or No. In fact, both tables are much larger, but this is the only necessary information. These two fact tables have a shared dimonsion Employee (with Employee ID and Name) and DateTable.
I would like to calculate % of employees that received a bonus, so ( # Employees that received bonus / Number of employees at current month)*100. I first tried to transfer the necessary info for this calculation from one fact table to the other by LookupValue, but this did not work out. Also, I prefer to have a measure, but the problem for me is the mix of the two fact tables.
Thanks in advance!
1 Reply
- lbendlinSuper User
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.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523