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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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:
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
@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)
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
)