Reply
jhoyabel19
Helper I
Helper I
Partially syndicated - Outbound

Help: what is the Dax code To use????

Hi Newbie here in Dax formula, 

 

what formula should i use if this is the outcome that i want to see ( expected Result, i want to get the oldest date). Thank you so much for the help

 

ProfileIdFinal Submission DateDistinctProfileDate expected Result
18747510/03/2023187475-3/10/2023 187475-3/10/2023
18747510/03/2023187475-3/10/2023 187475-3/10/2023
18747527/03/2023187475-3/27/2023 blank
18747527/03/2023187475-3/27/2023 blank
18747527/03/2023187475-3/27/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747501/04/2023187475-4/1/2023 blank
18747524/04/2023187475-4/24/2023 blank
18747524/04/2023187475-4/24/2023 blank
18747527/04/2023187475-4/27/2023 blank
18747527/04/2023187475-4/27/2023 blank
18747527/04/2023187475-4/27/2023 blank
18747528/03/2023187475-3/28/2023 blank
2 REPLIES 2
sevenhills
Super User
Super User

Syndicated - Outbound
Exprected Column Result = 
IF ( 'Table'[ProfileId] = MIN('Table'[ProfileId]) 
          && 'Table'[Final Submission Date] = CALCULATE(Min('Table'[Final Submission Date]), Filter('Table', 'Table'[ProfileId] = MIN('Table'[ProfileId]) 
                                                                                                              && 'Table'[Final Submission Date] <= EARLIEST('Table'[Final Submission Date])))
   , 'Table'[DistinctProfileDate], blank()
)

Column DAX code

Greg_Deckler
Super User
Super User

Syndicated - Outbound

@jhoyabel19 As a column:

expected Result column = 
  VAR __ProfileId = [ProfileId]
  VAR __MinDate = MINX(FILTER('Table', [ProfileId] = __ProfileId), [Final Submission Date])
  VAR __Result = MINX(FILTER('Table', [ProfileId] = __ProfileId && [Final Submission Date] = __MinDate), [DistinctProfileDate])
RETURN
  __Result


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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)