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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX: Cannot get date value to copy over to new column compared to another value

Hello,

 

I have a column called "GB Cert Date" that should only have one value per person (i. e. sorted by ID, each person has multiple rows but only one of them has this date) and my code works when I put "test", but whenever I want to copy over the date and have it filled to the rest of the user's rows, it only goes into one column.

 

 

GB Test Cert Date = 
var _cnt = countx(filter('DRMRecords', [User ID] = earlier([User ID])), [User ID])
var _cntc = countx(filter('DRMRecords', [User ID] = earlier([User ID]) && [IsGBCertRelated] = "Y"), [User ID])
var _date = FIRSTNONBLANK(DRMRecords[GB Cert Date],MIN([GB Cert Date]))
return


Switch(true() ,
 _cntc > 0, _date,
 BLANK()
 )

 

 

It comes out as:

GB Cert Test Date

 

10/10/2017

 

-----------------

 

With "test" instead of _date
GB Cert Test Date
Test

Test

Test

Test

 

What I want:

GB Cert Test Date

10/10/2017

10/10/2017

10/10/2017

10/10/2017

 

Anyone know how I can produce this result?

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

GB Test Cert Date Column = 
  IF(
    ISBLANK([GB Cert Date]),
    MAXX(FILTER('Table',[User ID] = EARLIER('Table'[User ID])),[GB Cert Date]),
    [GB Cert Date]
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

GB Test Cert Date Column = 
  IF(
    ISBLANK([GB Cert Date]),
    MAXX(FILTER('Table',[User ID] = EARLIER('Table'[User ID])),[GB Cert Date]),
    [GB Cert Date]
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors