Forum Discussion
Lastnonblankvalues correspondence value
Hi Team,
Here is my saple data, I need to get the value of correspondent value of lastnonblankvalue column.
I need the va;ue which is market in Yellow as Slaes column has blank value after 12 and need the target of the same which is 12.
Thanks!
LASTNONBLANKVALUE Evaluates an expression filtered by the sorted values of a column. That doesn't help in your scenario as LASTNONBLANKVALUE('Table'[Sales],max('Table'[Target])) would return 35 (because 30 is the highest Sales value).
Instead you would do something like
CALCULATE(sum('Table'[Target]),'Table'[Week]=maxx(filter('Table',not isblank('Table'[Sales])),[Week]))
1 Reply
- lbendlin
Super User
LASTNONBLANKVALUE Evaluates an expression filtered by the sorted values of a column. That doesn't help in your scenario as LASTNONBLANKVALUE('Table'[Sales],max('Table'[Target])) would return 35 (because 30 is the highest Sales value).
Instead you would do something like
CALCULATE(sum('Table'[Target]),'Table'[Week]=maxx(filter('Table',not isblank('Table'[Sales])),[Week]))