Forum Discussion

tylermontney's avatar
tylermontney
Regular Visitor
10 years ago
Solved

FIRSTNONBLANK returns blank

I want to return a columns first non blank value.   LastLogon = FIRSTNONBLANK('TestReport'[Account_Name], 1) & " was the last to logon." Unfortunately, it returns nothing. I can verify the column ...
  • v-ljerr-msft's avatar
    10 years ago

    tylermontney

     

    The formula you provided should work if the rest value of column Account_Name is Blank(except value "tyler.montney"). Now the formula does not get the expected value, so I assume the rest value of the column Account_Name is not Blank, it is empty("").

     

    In this case, the following formula should work:

    LastLogon = 
    CALCULATE (
        FIRSTNONBLANK ( 'TestReport'[Account_Name], 1 ) & " was the last to logon.",
        TestReport[Account_Name] <> ""
    )