Forum Discussion
Get last non blank value ordered by date
- Anonymous1 year ago
Hi tokhir ,
You can create a measure as below to get it:
Last non blank value = VAR _maxdate = CALCULATE ( MAX ( 'Table'[Date] ), FILTER ( 'Table', NOT ( ISBLANK ( 'Table'[Amount] ) ) ) ) RETURN CALCULATE ( MAX ( 'Table'[Amount] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _maxdate ) )Best Regards
Sorry your request is not clear. What do you mean "If i use dax to get last amount value without any filter, it is ordered from smallest to largest" ?
Presumably these columns are in the same table? If so, why show them separately?
Please show a clear example of the result you want.
Regards
Phil
Yes, they are both in the same table
If i use LASTNONBLANK('TableName'[YourValueColumn], 1) to get last non blank value from my numeric column its return the biggest one. I dont know why. For test purposes i paste this column to table and yes, its in smallest to largest order not in the format in initial table with date
I just need last non blank value from numeric column in order like in my table(i showed above the example)