Search code examples
daxtabular

dax if column is null or blank how can I set my as result previous column


currently my dax formula is =pathitem([hierarchy path]), 3) for column3 but I want to add formula that if column is blank or null get value from column2. How can I write dax formula for that?


Solution

  • You could use something like this:

    =
    IF (
        ISBLANK ( PATHITEM ( [Hierarchy Path], 3 ) ),
        [Column3],
        PATHITEM ( [Hierarchy Path], 3 )
    )
    

    Column3 would have to be Data Type Text.