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.
Dear All,
I have the below Table and I wanted to add the total hours for one employee in month-wise and add in the next column and calculate the CTC allocation according, Please help me I tried every possible I know.
My Table
Id | Month | Hours | CTC |
1 | Jan | 10 | 1000 |
1 | Jan | 5 | 1000 |
1 | Feb | 25 | 1100 |
1 | Feb | 10 | 1100 |
2 | Feb | 10 | 1300 |
2 | Feb | 15 | 1300 |
2 | Mar | 30 | 1500 |
2 | Mar | 40 | 1500 |
Desired Output
Id | Month | Hours | CTC | Total Hours | CTC Allocation |
1 | Jan | 10 | 1000 | 15 | 666.67 |
1 | Jan | 5 | 1000 | 15 | 333.33 |
1 | Feb | 25 | 1100 | 35 | 785.71 |
1 | Feb | 10 | 1100 | 35 | 314.29 |
2 | Feb | 10 | 1300 | 25 | 520.00 |
2 | Feb | 15 | 1300 | 25 | 780.00 |
2 | Mar | 30 | 1500 | 70 | 642.86 |
2 | Mar | 40 | 1500 | 70 | 857.14 |
Solved! Go to Solution.
@askspepsi
Add the following column:
Column =
DIVIDE(
Table4[CTC],
CALCULATE(
SUM(Table4[Hours]),
ALLEXCEPT(Table4,Table4[Id],Table4[Month])
)
) * [Hours]
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi, @askspepsi
Please check the below picture and the sample pbix file's link down below.
It is for creating measures, not columns.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @askspepsi
Please check the below picture and the sample pbix file's link down below.
It is for creating measures, not columns.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@askspepsi
Add the following column:
Column =
DIVIDE(
Table4[CTC],
CALCULATE(
SUM(Table4[Hours]),
ALLEXCEPT(Table4,Table4[Id],Table4[Month])
)
) * [Hours]
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |