Forum Discussion
Fill blank values with previous value
- 6 years ago
Anonymous
You can use the below Measure, I only changed the EARLIER function to MAX.
Measure_Filldown = VAR LNBT = CALCULATE(MAX('Table'[YEAR-WEEK]), FILTER( ALL('Table'), 'Table'[YEAR-WEEK]<=MAX('Table'[YEAR-WEEK]) && 'Table'[TARGET]<>BLANK() ) ) RETURN CALCULATE( MAX([TARGET]), 'Table'[YEAR-WEEK] = LNBT ,ALL('Table') )
Did I answer your question? Mark my post as a solution!
Anonymous
Evaluation context in Column (Table) and Measure are different in this case.
Thanks
Did I answer your question? Mark my post as a solution!
Anonymous
You can use the below Measure, I only changed the EARLIER function to MAX.
Measure_Filldown =
VAR LNBT =
CALCULATE(MAX('Table'[YEAR-WEEK]),
FILTER(
ALL('Table'),
'Table'[YEAR-WEEK]<=MAX('Table'[YEAR-WEEK]) && 'Table'[TARGET]<>BLANK()
)
)
RETURN
CALCULATE(
MAX([TARGET]),
'Table'[YEAR-WEEK] = LNBT ,ALL('Table')
)
Did I answer your question? Mark my post as a solution!
- Anonymous6 years agoNot applicable
Hi ,
I m getting one strange issue. I have connected DATA table with Date dimension and pulling Year-Week from date table. Its showing incorrect result when i sort measure2 based year-week order,otherwise its showing correct result.
Using below formula
Measure2 = VAR LNBT =CALCULATE(MAX('Date'[YEAR-WEEK]),FILTER(ALL('Date'),'Date'[YEAR-WEEK]<=MAX('Date'[YEAR-WEEK]) && RELATED(Data[TARGET])<>BLANK()))RETURNCALCULATE(MAX([TARGET]),'DATA'[YEAR-WEEK] = LNBT ,ALL('DATE'))- Fowmy6 years agoSuper User
Hi Anonymous
I tested with the measure that I shared and it works, please check the attached file.
https://1drv.ms/u/s!AmoScH5srsIYgYFdHeVAE8V-SZzFFQ?e=d1YwV3- Anonymous6 years agoNot applicable
Hi,
I tested with your measure in my PBI,its not showing same result.