Forum Discussion
Anonymous
9 years agoNot applicable
Get Last 3 Non Blank values from a Column
Hello All, I have table as follows. Here i need to get the values of 5/31/2017, 5/30/2017 and 5/29/2017 values from comments columns if my table contains comments column as I.e ...
v-qiuyu-msft
Community Support
9 years agoHi Anonymous,
You can also create a index column in Power Query with code below:
Then create a measure:
Last3Blanks = var l= CALCULATE(MAX('Calendar'[Index]),FILTER(ALL('Calendar'),'Calendar'[Task]=MAX('Calendar'[Task]) &&'Calendar'[Comment]=BLANK() ))
return
CONCATENATEX(CALCULATETABLE('Calendar',FILTER('Calendar','Calendar'[Index]<l && 'Calendar'[Index]>=l-3)),'Calendar'[Date],",")
You can download attached .pbix file.
Best Regards,
Qiuyun Yu
Anonymous
7 years agoNot applicable
hi v-qiuyu-msft how to create index column for particular column in direct query ???