Forum Discussion
Anonymous
6 years agoNot applicable
Sum values current date - sum values last date
I am trying to subtract the values of the current date from the day before the current date. What I have: Measure = CALCULATE(SUM(Base[MCL Current value SEK]);ALLSELECTED(Base[Date])) - CALC...
v-diye-msft
6 years agoCommunity Support
Hi Anonymous
Let me know if you'd like to get below results:
Measure = CALCULATE(MAX('Table'[MCL Value]),FILTER(ALL('Table'),[Day]=MAX('Table'[Day])-1))
Anonymous
6 years agoNot applicable
I want to subtract the sum of the current date with the last date of the current date.
I can't use "(date)-1" because it is not going to be always -1, it depends if we have holidays or weekend.
I need to count automatically the number of one day to another, example:
Column:
var last_date= CALCULATE(maxx(Base;Base[Date]);filter(Base;Base[Date]<EARLIER(Base[Date])))
return previous_day_count = DATEDIFF(Base[Date];Base[Dia_Anterior_tag];DAY)
This way I can use "previous_day_count" into "-1".
And also, the column "MCL Value" is a sum, not a maximum value.