Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
wcloninger
Helper I
Helper I

Flagging a the first time of a series based on another column

I want to flag the first occurence rows with a "1" of each incident number. I've seen a lot online, but I haven't seen anything based on another column.

wcloninger_0-1707150000872.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @wcloninger ,

 

If you run into a situation where the dates are all the same and it's hard to distinguish the first row, you can create an Index in the power query.

Here are the steps you can follow:

1. In Power Query -- add Column – Index Column – From 1.

vyangliumsft_0-1707192721943.jpeg

2. Create calculated column.

Test =
var _rank=
RANKX(
    FILTER(ALL('Table'),'Table'[records.Incident Number]=EARLIER('Table'[records.Incident Number])),
    [Index],,ASC)
return
IF(
    _rank=1,_rank,BLANK())

3. Result:

vyangliumsft_1-1707192721945.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @wcloninger ,

 

If you run into a situation where the dates are all the same and it's hard to distinguish the first row, you can create an Index in the power query.

Here are the steps you can follow:

1. In Power Query -- add Column – Index Column – From 1.

vyangliumsft_0-1707192721943.jpeg

2. Create calculated column.

Test =
var _rank=
RANKX(
    FILTER(ALL('Table'),'Table'[records.Incident Number]=EARLIER('Table'[records.Incident Number])),
    [Index],,ASC)
return
IF(
    _rank=1,_rank,BLANK())

3. Result:

vyangliumsft_1-1707192721945.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@wcloninger , A new column

 

if ([Record Creation date] = minx(filter(Table, [incident number] = earlier([incident number]) ), [Record Creation date]), 1, blank())

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.