Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have Code, Status, Created (date) columns in my Power BI data. I want to create a another column named Revision Number column that will filter per Code and group one revision with ID. All revisions starts Initiated and ends with Approved.
Example below.
Solved! Go to Solution.
Hi, @MikeHunt
I use the data shown in your image as shown below:
First, I created an Index column using PowerQuery:
I created the Revision Number column using the following DAX expression:
Revision Number =
RANKX (
FILTER (
'Table',
'Table'[Status] = "Approved"
&& 'Table'[Code] = EARLIER ( 'Table'[Code] )
),
'Table'[Index],
,
ASC,
SKIP
)
Here are the results:
I've provided the PBIX file for this time below, and it would be great if I could help you.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @MikeHunt
I use the data shown in your image as shown below:
First, I created an Index column using PowerQuery:
I created the Revision Number column using the following DAX expression:
Revision Number =
RANKX (
FILTER (
'Table',
'Table'[Status] = "Approved"
&& 'Table'[Code] = EARLIER ( 'Table'[Code] )
),
'Table'[Index],
,
ASC,
SKIP
)
Here are the results:
I've provided the PBIX file for this time below, and it would be great if I could help you.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.