Forum Discussion

akim1's avatar
akim1
Regular Visitor
6 years ago
Solved

Dax Formula Help

Hi Community,   I need some help to create a Dax formula. As you can see in the table below, in some rows, in my source data, are returning blank in the company name. I'm thinking to create a new c...
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI akim1 ,

    You can try to use below calculate column formula if it suitable for your requirement:

    Condition column =
    IF (
        Table[Company Name] <> BLANK (),
        [Company Name],
        CALCULATE (
            LASTNONBLANK ( Table[Company Name], [CompanyName] ),
            FILTER (
                ALL ( Table ),
                [Comany Code] = EARLIER ( Table[Company Code] )
                    && [Currency] = "USD"
            )
        )
    )
    

    Regards,

    Xiaoxin Sheng