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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Flag first timestamp for a list of events per LeadId

Hi,

 

I need to identify and isolate the first timestamp modify per lead. The goal is to count number of leads per the first status of a lead.

 

I tried with the following:

 

Test =
VAR LowestTime =
MIN( 'SR.LeadDetails'[TimeStatusModified] )
RETURN
CALCULATE(
MIN( 'SR.LeadDetails'[TimeStatusModified] ),
ALLSELECTED(),
VALUES( 'SR.LeadDetails'[LeadId] )
)

 

Which gives me this:

 

Capture2.PNG

 

So I can isolate the first timestamp, but when I wrap it in a IF and try to make it a 1 or 0, it messes up the filter context an table.

 

Any thoughts on how I can do this? It should be the first timestamp where a status is not "Blank".

 

Thank you!

 

// Ali

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

measure = if(MIN( 'SR.LeadDetails'[TimeStatusModified] ) = calculate(MIN( 'SR.LeadDetails'[TimeStatusModified] ), filter( allselected('SR.LeadDetails'), 'SR.LeadDetails'[LeadId] = max('SR.LeadDetails'[LeadId]))) ,1 ,0)

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
Anonymous
Not applicable

Hi,

 

Thanks for your response.

 

Almost! But when I use that it shows up another row for some reason now? I also want it to not take "blank" into consideration so I changed it to:

 

Test =
IF(
MIN( 'SR.LeadDetails'[DateStatusModifiedFull] )
= CALCULATE(
MIN( 'SR.LeadDetails'[DateStatusModifiedFull] ),
FILTER(
ALLSELECTED( 'SR.LeadDetails' ),
'SR.LeadDetails'[LeadId] = MAX( 'SR.LeadDetails'[LeadId] )
),
'SR.LeadDetails'[Status] <> "Blank"
),
1,
0
)

 

Capture2.PNG

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.