March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Power BI: My objective is to allocate fee from engagement to others engagement.
Table engagement
EngagementNo | fee | Alocate_to | Amount
001 5000 002 500
002 4500
The results I want should look like
EngagementNo | fee | Alocate_to | Amount | results
001 5000 002 500 4500
002 4500 5000
EngagementNo 001 that has 5000 should subtract 500 and get 4500 as results. EngagementNo 002 should get more 500 to get result of 5000 from EngagementNo 001
Solved! Go to Solution.
Hi @Moji_mook ,
You can create a calculated column as below to get it, please find the details in the attachment.
Results =
VAR _eno = 'Table'[EngagementNo]
VAR _aloamount =
CALCULATE (
SUM ( 'Table'[Amount] ),
FILTER ( 'Table', _eno = 'Table'[Alocate_to] )
)
RETURN
'Table'[fee] - 'Table'[Amount] + _aloamount
Best Regards
Hi @Moji_mook ,
You can create a calculated column as below to get it, please find the details in the attachment.
Results =
VAR _eno = 'Table'[EngagementNo]
VAR _aloamount =
CALCULATE (
SUM ( 'Table'[Amount] ),
FILTER ( 'Table', _eno = 'Table'[Alocate_to] )
)
RETURN
'Table'[fee] - 'Table'[Amount] + _aloamount
Best Regards
Thank you for the solution! It works perfectly. Do you have any Ideas if I have a column period and I want to alocate only in same period.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
7 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
8 | |
3 | |
2 | |
2 | |
2 |