Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table called "Original" as follows. I need to add a new column, temporarily named "nw_updated_date" (referencing "Updated"). The logic is to update the "nw_updated_date" only when the "reason" changes. For example, in the case of id = 1, when rev changes from 3 to 7 and the "reason" is "assigned" for all these rows, then "nw_updated_date" should be "07:02:06AM".
Original:
id,rev,reason,updated_date
1,1,awaiting,11/13/2023 10:02:06AM
1,2,awaiting,11/13/2023 11:02:06AM
1,3,assigned,11/14/2023 07:02:06AM
1,4,assigned,11/14/2023 09:02:06PM
1,5,assigned,11/15/2023 09:02:06PM
1,6,assigned,11/16/2023 09:02:06PM
1,7,assigned,11/17/2023 09:02:06PM
1,8,awaiting,11/18/2023 07:02:06PM
2,1,awaiting,11/13/2023 07:02:06PM
2,2,awaiting,11/15/2023 10:02:06PM
Updated:
id,rev,reason,updated_date,nw_updated_date
1,1,awaiting,11/13/2023 10:02:06AM,11/13/2023 10:02:06AM
1,2,awaiting,11/13/2023 11:02:06AM,11/13/2023 10:02:06AM
1,3,assigned,11/14/2023 07:02:06AM,11/14/2023 07:02:06AM
1,4,assigned,11/14/2023 09:02:06PM,11/14/2023 07:02:06AM
1,5,assigned,11/15/2023 09:02:06PM,11/14/2023 07:02:06AM
1,6,assigned,11/16/2023 09:02:06PM,11/14/2023 07:02:06AM
1,7,assigned,11/17/2023 09:02:06PM,11/14/2023 07:02:06AM
1,8,awaiting,11/18/2023 07:02:06PM,11/18/2023 07:02:06PM
2,1,awaiting,11/13/2023 07:02:06PM,11/13/2023 07:02:06PM
2,2,awaiting,11/15/2023 10:02:06PM,11/13/2023 07:02:06PM
Can you please help me with the DAX formula for this?
I also attached sample PBI file, please check.
Solved! Go to Solution.
Hi @Roy_W ,
Below is my table:
The following DAX might work for you:
new update date =
IF(
'Table'[Id] == 1 && 'Table'[reason] = "assigned" ,
CALCULATE(
MIN('Table'[updated_date]),
FILTER('Table','Table'[Id] == 1 && 'Table'[reason] = "assigned")),
'Table'[updated_date]
)
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Roy_W ,
Below is my table:
The following DAX might work for you:
new update date =
IF(
'Table'[Id] == 1 && 'Table'[reason] = "assigned" ,
CALCULATE(
MIN('Table'[updated_date]),
FILTER('Table','Table'[Id] == 1 && 'Table'[reason] = "assigned")),
'Table'[updated_date]
)
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
try this
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |