Forum Discussion
Need help in DAX
It is not clear to me what your desired output is. Please elaborate.
actually the formula for Total Value is SUM(A+B+C-(Targetvalue-Previousdayvalue). For 1st day of month previous value is zero as a static value passing. whatever value I am getting that value should pass it on 2nd day total value.
For 2nd day the Total value is SUM(A+B+C -(Targetvalue-1stdayTotalvalue).
2nd day, 1stdayTotalvalue will become previousday value for 2nd day.
For 3rd day total value is SUM(A+B+C-(Targetvalue-2ndtotalvalue).
3rd day, 2nd day Total Value will become previousday value for 3rd day..
and so on.
- lbendlin2 years agoSuper User
My proposal produces the same result, but in a simplified manner, without the need for intermediate columns.
- Anonymous2 years agoNot applicable
What will happen if 4th day get Totalvalue as zero, then I should be doing Targetvalue-Previous day value (then my previous day value shouldn't be running sum, I should pass as zero. that scenario will get failed above solution.
- lbendlin2 years agoSuper User
You cannot do conditional aggregations in DAX. They are only possible in Power Query.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.