Forum Discussion
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:
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
8 Replies
- cmilligan262
Helper II
Yucy Can you provide more info on why some of the closed values in the state column correspond to a blank and why others correspond to closed
- Yucy
Helper I
Sorry, my bad. The closed at new column for category C should be blank, but Closed at new column for category E should be closed because there is no resolved for E, then I want to keep the closed
- amitchandak
Super User
- v-yuta-msft
Community Support
Yucy ,
I'm still not understand of the logic of how to create 'new column' you mentioned, could you please clarify more details?
Regards,
Jimmy Tao
- Yucy
Helper I
Thanks for helping, my table has column A and B, Category and State, I need to insert a new column as column C. my if statement never works,