Forum Discussion
TheHans
Helper I
5 years agoGet previous date values
Hi Guys, I have a table that contains a report date and values for that date. The dates are unique in the table. In the visual I would like to highlight the differences of Amount 1 (Report date-Pr...
- 5 years ago
Hi,
pls see below:
PrevAmount = VAR _selDate = SELECTEDVALUE(DimDate[Date]) VAR _maxDate = CALCULATE(LASTNONBLANK(DimDate[Date], CALCULATE(SUM('Table'[Amount1]))), FILTER(ALLSELECTED(DimDate), [Date] < _selDate)) RETURN IF(NOT(ISBLANK(SUM('Table'[Amount1]))), CALCULATE(SUM('Table'[Amount1]), FILTER(ALLSELECTED(DimDate),DimDate[Date] = _maxDate)), BLANK())Kind regards, Steve.
stevedep
Memorable Member
5 years agoHi,
pls see below:
PrevAmount =
VAR _selDate = SELECTEDVALUE(DimDate[Date])
VAR _maxDate = CALCULATE(LASTNONBLANK(DimDate[Date], CALCULATE(SUM('Table'[Amount1]))), FILTER(ALLSELECTED(DimDate), [Date] < _selDate))
RETURN
IF(NOT(ISBLANK(SUM('Table'[Amount1]))),
CALCULATE(SUM('Table'[Amount1]), FILTER(ALLSELECTED(DimDate),DimDate[Date] = _maxDate)), BLANK())
Kind regards, Steve.
- TheHans5 years ago
Helper I
Hey Steve,
thanks a lot. Appreciate your support.
Hans