Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Moji_mook
Frequent Visitor

Power BI : Allocate Fee from EngagementNo to Another EngagementNo

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

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

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

vyiruanmsft_0-1695608473351.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

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

vyiruanmsft_0-1695608473351.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.