Forum Discussion
Anonymous
4 years agoNot applicable
Get last value in date column
Hello, I need to perform ISBLANK on a date column where there are blank values, so i thought to change the null values to 01/01/1000. But, i cant still use IF function to compare the MAX[DATE]-1 = ...
- 4 years ago
Hi Anonymous
go to power query, add an index column, then use the column code below
Column = var _last=MAXX(FILTER('Table','Table'[Index]<EARLIER('Table'[Index]) && 'Table'[Column1]<>BLANK()),[Index]) var _date=MAXX(FILTER('Table','Table'[Index]=_last),[Column1]) return IF(ISBLANK('Table'[Column1]),_date-'Table'[Index]+_last,'Table'[Column1])result
Regards,
OliT
Anonymous
4 years agoNot applicable
In simple words
I wish this measure to return the value 1;
Measure 2 = IF(ISBLANK(MAX(CUF[Date])-1),1,0)
as the date 07/08/2022 is blank in my date column;
OliT
4 years agoResolver I
Hi Anonymous
go to power query, add an index column, then use the column code below
Column =
var _last=MAXX(FILTER('Table','Table'[Index]<EARLIER('Table'[Index]) && 'Table'[Column1]<>BLANK()),[Index])
var _date=MAXX(FILTER('Table','Table'[Index]=_last),[Column1])
return
IF(ISBLANK('Table'[Column1]),_date-'Table'[Index]+_last,'Table'[Column1])
result
Regards,
OliT