Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hey all,
Having trouble figuring out the DAX here. Want to create a calculated column that will disaggregate the paid to date for a lawsuit by the separate invoices. For Example: $1000 has been paid out for Lawsuit Key Value 1. There are 4 invoices for that lawsuit, thus in column 5 the value needs to be 250 for Lawsuit Value 1. What is the DAX formula here? Thanks all! Pic below.
Solved! Go to Solution.
@Anonymous
Hi,
Goal =
[Amount paid to date for law suit]
/ CALCULATE (
COUNTROWS ( TableName ),
ALLEXCEPT ( TableName, TableName[Lawsuitkey] )
)
Here's the formula for your column:
Percent Change =
var __actual = TableName[Actual Paid to Date Spread]
var __budgeted = TableName[Budgeted for Lawsuit]
var __percentChangeFromBudgeted =
DIVIDE(
__actual - __budgeted,
__budgeted
)
return
__percentChangeFromBudgetedPlease always precede the name of a column with the name of the table it belongs to and never precede the name of a measure with the name of the table it belongs to.
Second, the formula does not multiply by 100 because this is not how it should work. It returns a number and you have to format it as percentage using the formatting group in the ribbon:
Hope this helps.
Best
Darek
@Anonymous
Hi,
Goal =
[Amount paid to date for law suit]
/ CALCULATE (
COUNTROWS ( TableName ),
ALLEXCEPT ( TableName, TableName[Lawsuitkey] )
)
Hey @Zubair_Muhammad One more question. What then would be the DAX formula to calculate the percent change between the amount paid and the amount budgeted. The formula is in the picture I've attached. You've been a tremendous help!
Best.
Here's the formula for your column:
Percent Change =
var __actual = TableName[Actual Paid to Date Spread]
var __budgeted = TableName[Budgeted for Lawsuit]
var __percentChangeFromBudgeted =
DIVIDE(
__actual - __budgeted,
__budgeted
)
return
__percentChangeFromBudgetedPlease always precede the name of a column with the name of the table it belongs to and never precede the name of a measure with the name of the table it belongs to.
Second, the formula does not multiply by 100 because this is not how it should work. It returns a number and you have to format it as percentage using the formatting group in the ribbon:
Hope this helps.
Best
Darek
How can I calculate then instead of just disaggregating the budget amount evenly across invoices, 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?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |