Forum Discussion
ThomasWeppler
1 year agoImpactful Individual
Max date orginised
Hi power Bi community I have a measure that looks at the last budgetentry for a selected date. My problem is when two entries have been entered the same date they are both added together, I only ...
- 1 year ago
In the end I changed the code in the sql server so I only got the relevant data in PowerBI and than it worked with the DAX I already had.
But thanks a ton to all the people who came with suggestions and tried to help me. I have given all of you a kudo as a thanks. 🙂
AMeyersen
1 year agoResolver III
Hi,
I think you can change the last part of your formula.
Instead of
VAR __result =
CALCULATE(SUM('4072 BudgetEntry'[fixed amount]),__max_date_with_taskandbudget)
you can use something like this:
VAR __result =
CALCULATE(LASTNONBLANKVALUE('4072 BudgetEntry'[entry_id],SUM('4072 BudgetEntry'[fixed amount])),__max_date_with_taskandbudget)
That way you should be able to not return the sum of several rows but only the one with highest [intry_id].