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

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.

Reply
Anonymous
Not applicable

Handling Granularity Based on Percent to Total Instead of Equal Distribution

Instead of just disaggregating the budget amount evenly across invoices like in Column I; using DAX Power BI, how can I calculate the percent the invoice is to the total net amount for invoices charged to that specific lawsuit and then divide the budget based upon that percent (like in Column K)? I've attached a screenshot, and the formula would be a variation of the formula below.

 

Goal =
[Amount paid to date for law suit]
    / CALCULATE (
        COUNTROWS ( TableName ),
        ALLEXCEPT ( TableName, TableName[Lawsuitkey] )
    )powerbi example 2.PNG
2 REPLIES 2
Stachu
Community Champion
Community Champion

assuming lawsuit is the same as project id this calculated column should work

Column = 
VAR __ProjectKey = 'Table'[Project Key]
VAR __InvoiceHeaderKey = 'Table'[Invoice Header Key]
VAR __TotalPerProject = CALCULATE(SUM('Table'[Budgeted Amount]), FILTER(ALL('Table'), 'Table'[Project Key] = __ProjectKey))
RETURN
__TotalPerProject*'Table'[Invoice Percent Of Total Invoices]


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

@Stachu I guess the first question should have been how do I get 

'Table'[Invoice Percent Of Total Invoices]

This column is the Invoice Percent of Total Invoices grouped by Consulting Company Key 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors