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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jhoyabel19
Helper I
Helper I

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

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

@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...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.