1
votes

Could you please help me how to write a DAX measure in Power BI Desktop that would a) calculate the budget left for a set period (quarter) by subtracting total spend from total budget and b) redistribute the resulted budget leftover daily based on a daily % skew (that is set up manually)?

Please see the screenshot below for an example of a calculation (yellow column) I need to have in DAX.

dax_budget_leftovers_distribution

1

1 Answers

0
votes
Measure1 = Calculate(Sum(table1[spend actual]), All(table1))

Measure2 = Calculate(Sum(table2[budget]), All(table2))

Measure3 = Measure2 - Measure1

Measure4 = Divide(Calculate(Sum([BudgetReForecast%])), 100, blank()) * [Measure3]

Measure4 is what gets put in the table next to the table3 Date field.

This question is very vague, and I think your logic may not work when you apply this to a whole dataset of dates, but this is the general idea..