Forum Discussion
Lastnonblank not returning correct results
I'm trying to return the last non-blank row of the "Target stage outcome" column based on the "Entity" column. However, using the lastnonblank dax formula is not yielding the correct results.
I have attached the example fact table below.
Here is the results that I'm trying to get are those in the red box:
I've created a summary table to see the results
Despite the "Index" and "Last day" returning the correct results, the "Stage" field is not returning the correct result.
This is the "Target" table that I'm using in my summary table above
I would appreciate if someone could help me here.
Thanks
try LASTNONBLANKVALUE(Target[Reponse Date],MAX(Target[Target Stage Outcome]))
5 Replies
- wdx223_Daniel
Community Champion
LASTNONBLANK, sorts the column in the first parameter, then get the last value of which the second parameter is non blank
- AnonymousNot applicable
wdx223_Daniel Would that mean that it would sort the "target stage outcome" first then only determine the lastnonblank for the "Response date"?
- wdx223_Daniel
Community Champion
try LASTNONBLANKVALUE(Target[Reponse Date],MAX(Target[Target Stage Outcome]))