Forum Discussion
utilisation % based on two tables
I have two tables. Table 1 got the ID,Name,Dep,Approved amount and QTR. Table 2 got ID,Name,Dep,Used amount and QTR.
I need a measure that will help me to calculate the utilisation % for each employee.
Formula=Table 2[used amount]/Table 1[Approved amount]
Below is the sample data.
| Table 1 | ||||
| ID | Name | Dep | Approved_Amount | QTR |
| 123 | Raj | Sales | 234 | Qtr 1 |
| 234 | Sam | PRO | 345 | Qtr 1 |
| 234 | Sam | PRO | 654 | Qtr 1 |
| 256 | Rex | Ser | 345 | Qtr 1 |
| 256 | Rex | Ser | 357 | Qtr 1 |
| 123 | Raj | Sales | 789 | Qtr 2 |
| 234 | Sam | PRO | 654 | Qtr 2 |
| 234 | Sam | PRO | 890 | Qtr 2 |
| 256 | Rex | Ser | 234 | Qtr 2 |
| 256 | Rex | Ser | 654 | Qtr 2 |
| Table 2 | ||||
| ID | Name | Dep | Used_Amt | QTR |
| 123 | Raj | Sales | 234 | Qtr 1 |
| 234 | Sam | PRO | 345 | Qtr 1 |
| 234 | Sam | PRO | 654 | Qtr 1 |
| 256 | Rex | Ser | 345 | Qtr 1 |
| 256 | Rex | Ser | 357 | Qtr 1 |
| 123 | Raj | Sales | 789 | Qtr 2 |
| 234 | Sam | PRO | 654 | Qtr 2 |
| 234 | Sam | PRO | 890 | Qtr 2 |
| 256 | Rex | Ser | 234 | Qtr 2 |
| 256 | Rex | Ser | 654 | Qtr 2 |
8 Replies
- amitchandakSuper User
Create common dimension of Employee and Qtr and then this formula will work across common dimesions
Formula=divide(sum(Table 2[used amount]),sum(Table 1[Approved amount]))
Like
QTR Dim = distinct(union(all(Table1[QTR]),all(Table2[QTR])))
If Name and Dept is unique for ID .
Employee = distinct(union(summarize(table1, table1[ID], table1[Name], table1[Dept]),
summarize(table2, table2[ID], table2[Name], table2[Dept])))You can use selectcolumns in place of summarize
- AnonymousNot applicable
Hi unnijoy ,
The answer has already been provided in the above post.
Only addition is that you will need to make some Data Modelling changes. posting since was working on this file.
Please find .pbix attached
https://drive.google.com/file/d/1LDE9AVTI3U8vE_HpChOb9Bfa3L4az5Fu/view?usp=sharing
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!
- unnijoyPost Prodigy
Anonymous
The link is asking for signin. can you make it like last time. wer i don't need to signin. The moment i click the link i got a page wer i can download the file.
- AnonymousNot applicable
unnijoy ,
https://drive.google.com/file/d/1lZTc-acls1PKWWpqQ2OWYp2KcQm-wqkD/view?usp=sharing
Regards,
Harsh Nathani