Forum Discussion
Get Last 3 Non Blank values from a Column
Greg_Deckler please have a look at the below reply.
I have given info about the data that i am working.
Hi 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
- prateekraina9 years ago
Memorable Member
Hi v-qiuyu-msft,
Out of curiosity, how did you attach the zip file in a reply? :D
Regards,Prateek Raina
- v-qiuyu-msft9 years ago
Community Support
Hi prateekraina,
I'm a Moderator role in this forum, so I can attach files.
You can upload any files to your OneDrive and share the link here.
Best Regards,
Qiuyun Yu
- Anonymous7 years agoNot applicable
hi v-qiuyu-msft how to create index column for particular column in direct query ???