Forum Discussion
Populate with first non blank
Thanks for your help, How I must do to "filter" by ID ? Because in this case, the formula don't care about the IDs.
This is the results :
I try this formula, I'm near of the goal, but not reach yet ! =D
Colonne = IF(ISBLANK(Feuil1[Column2]);CALCULATE( FIRSTNONBLANK(Feuil1[Column2]; TRUE()); FILTER(Feuil1;Feuil1[Column1] = EARLIER(Feuil1[Column1])));Feuil1[Column2])
Result :
The issue is for example with the first line "A / Null / 15", the result must be "A / Null / 21".
Do you know why I only get "15" and not the last value ?
Thanks
- BenjaminFab458 years agoFrequent Visitor
After some tests I think I need to sort my table with date (not visible on this sample dataset) because I Think power bi by default sort by..... something but not know which.
I'm right ? If yes, how I can sort data by date ?
- BenjaminFab458 years agoFrequent Visitor
I found this article : http://www.excelnaccess.com/using-firstnonblank-lastnonblank-in-dax/
It's almost the goal, just need to take care about the ID.
Do you know how I can do ?
- nirvana_moksh8 years ago
Impactful Individual
Use the below DAX:
CALCULATE(LASTNONBLANK('TableA'[Table A Column Name],1),FILTER('TableA','TableA'[Index] = MIN('TableA'[Index])))
And in Power Query Editor define a Index Column which will serve as ID, then in the above DAX change MIN to MAX or vice versa based on your sort.