Forum Discussion
AU555
6 years agoHelper I
Substracting values in same columns based on date column
Hi everybody, I hope I could get a little help here. I need a help to create following calculated column and that is "compared" in my sample table. We generate new dates for actual and planned f...
- Anonymous6 years ago
Column = VAR PrevDate = CALCULATE(MAX(Test[ReportingDate]),FILTER(ALL(Test[ReportingDate]),Test[ReportingDate]<MAX(Test[ReportingDate])),ALLEXCEPT(Test,Test[Product])) VAR PrevValue = CALCULATE(SUM(Test[PrevDateDiff]),Test[ReportingDate]=PrevDate,ALLEXCEPT(Test,Test[Product])) RETURN CALCULATE(SUM(Test[DateDiff])-PrevValue,ALLEXCEPT(Test,Test[Product]))
Anonymous
6 years agoNot applicable
Column = VAR PrevDate = CALCULATE(MAX(Test[ReportingDate]),FILTER(ALL(Test[ReportingDate]),Test[ReportingDate]<MAX(Test[ReportingDate])),ALLEXCEPT(Test,Test[Product])) VAR PrevValue = CALCULATE(SUM(Test[PrevDateDiff]),Test[ReportingDate]=PrevDate,ALLEXCEPT(Test,Test[Product])) RETURN CALCULATE(SUM(Test[DateDiff])-PrevValue,ALLEXCEPT(Test,Test[Product]))
AU555
6 years agoHelper I
Than you so much, works just as i wanted to! :)