Forum Discussion
sananakbar56
4 years agoFrequent Visitor
Use FIRSTNONBLANK() with String and Date
Hi all, I need help with using FIRSTNONBLANK() sorting a string column by date. Unfortunately, when I sort it by the string, it returns me the min(string) because A is lower than B and B lower than C...
- 4 years ago
Hi sanaankbar56,
I was very clear with your requirement and I have tested it as below.
from above table, the "FirstRetnFruit" is the measure for for it.
The code is as I showed at my previous answer.
Hope this helps you. Thanks
colacan
Resolver II
4 years agoHi sanaankbar56,
I was very clear with your requirement and I have tested it as below.
from above table, the "FirstRetnFruit" is the measure for for it.
The code is as I showed at my previous answer.
Hope this helps you. Thanks
sananakbar56
4 years agoFrequent Visitor
It worked now. We were missing one filter.
FirstReturnProduct =
CALCULATE(
CALCULATE(
FIRSTNONBLANKVALUE(
Fruits[TransactionDate],
SELECTEDVALUE( fruits[Purchase] )
),
ALLEXCEPT( Fruits, Fruits[CustomerID] ), Fruits[TransactipnType] = "Return"
)
Thanks a lot for your help. I have accepted this as solution.