Forum Discussion

Yucy's avatar
Yucy
Icon for Helper I rankHelper I
6 years ago
Solved

Need help on if statement DAX

Hello all,  I have a small table with category and state, I am looking for a new column. Can anyone help? Example is below:  
  • amitchandak's avatar
    amitchandak
    6 years ago

    Try like

    Column = var _res = COUNTX(filter(Sheet1,[State]="Resolved" && [Category] =EARLIER([Category])),[Category])+0
    return if([State]="Resolved" && _res>0, [State],if([State]="Closed" && _res=0,[State],BLANK()))

     

    File attached after signature