Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello all,
I have a small table with category and state, I am looking for a new column. Can anyone help? Example is below:
Solved! Go to Solution.
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
@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
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,
@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
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
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
Thank you for your help, however, it not working for me, maybe I did not provide enough data, Here is exactly what I have in my dataset, would you mind have a look again, I am sorry, thanks
case number | value | Opened | END | Column |
CS0080746 | Resolved | 1/20/2020 10:29 | 1/20/2020 11:03 | Closed |
CS0080746 | Resolved | 1/20/2020 10:29 | 1/23/2020 10:38 | Closed |
CS0080746 | Closed | 1/20/2020 10:29 | 1/31/2020 0:00 | Closed |
CS0080746 | Resolved | 1/20/2020 10:29 | 1/31/2020 0:00 | Closed |
CS0080772 | Resolved | 1/20/2020 10:54 | 1/21/2020 14:11 | Closed |
CS0080772 | Closed | 1/20/2020 10:54 | 2/01/2020 0:00 | Closed |
CS0080772 | Resolved | 1/20/2020 10:54 | 2/01/2020 0:00 | Closed |
CS0080798 | Closed | 1/20/2020 11:18 | 1/20/2020 13:22 | Closed |
CS0089655 | Closed | 2/13/2020 13:34 | 2/13/2020 13:35 | Closed |
Thanks, here is the table
Category | State | New Column |
A | Resolved | Resolved |
A | Resolved | Resolved |
A | Closed | |
B | Resolved | Resolved |
B | Closed | |
C | Resolved | Resolved |
C | Closed | |
C | Closed | |
D | Resolved | Resolved |
D | Resolved | Resolved |
D | Closed | |
D | Resolved | Resolved |
D | Resolved | Resolved |
E | ||
E | Closed | Closed |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
78 | |
59 | |
36 | |
33 |
User | Count |
---|---|
93 | |
59 | |
56 | |
49 | |
41 |