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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
murali5431
Helper III
Helper III

Need to pull date based on part number

Hi,

 

I am trying to extract date based on initial entry date of each PN using below DAX formula.

 

Adj Entry Date = CALCULATE(MIN('Table'[Initial Entry Dt]),ALLEXCEPT('Table','Table'[Entry No],'Table'[Part Number]) )
 
Output is as shown below under Adj Entry Date field. I need to get 05-Jun-20 wherever it has 05-Jun-20 under Initial Entry Dt. This is a sample data and I have data with multiple entries rach having its set of Part Numbers. Please assist.
 
Entry NoPart NumberInitial Entry DtAdj Entry Date
ABC36389906-May-2006-May-20
ABC35795606-May-2006-May-20
ABC36389905-Jun-2006-May-20
ABC36389905-Jun-2006-May-20
ABC35795605-Jun-2006-May-20
ABC35795605-Jun-2006-May-20
ABC32711105-Jun-2006-May-20
ABC32711105-Jun-2006-May-20
ABC25547906-May-2006-May-20

 

Thank you,

Muralidhar

1 ACCEPTED SOLUTION

Hi @murali5431 ,

 


 

Entry No Part Number Initial Entry Dt Adj Entry Date
ABC 363899 06-May-20 06-May-20
ABC 357956 06-May-20 06-May-20
ABC 363899 05-Jun-20 06-May-20
ABC 363899 05-Jun-20 06-May-20
ABC 357956 05-Jun-20 06-May-20
ABC 357956 05-Jun-20 06-May-20
ABC 327111 05-Jun-20 06-May-20
ABC 327111 05-Jun-20 06-May-20
ABC 255479 06-May-20 06-May-20
BBC 363899 01-Jun-19 02-Feb-19
BBC 357956 02-Feb-19 02-Feb-19
BBC 363899 01-Jun-19 02-Feb-19
BBC 363899 01-Jun-19 02-Feb-19
BBC 357956 01-Jun-19 02-Feb-19
BBC 357956 01-Jun-19 02-Feb-19
BBC 327111 01-Jun-19 02-Feb-19
BBC 327111 01-Jun-19 02-Feb-19
BBC 255479 02-Feb-19 02-Feb-19

 


Is the column "Adj Entry Date" what you want? If it is, create a column like so:

Adj Entry Date 2 = 
CALCULATE (
    MIN ( 'Table'[Initial Entry Dt] ),
    ALLEXCEPT ( 'Table', 'Table'[Entry No] )
)

adj.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@murali5431 , the formula seems correct for part level

see if this what you need

Adj Entry Date = CALCULATE(MIN('Table'[Initial Entry Dt]),ALLEXCEPT('Table','Table'[Entry No] ))

 

Hope this you are using it as measure not column

 

Spoiler
 

Hi @amitchandak .. I am using it as a column in the table.

 

Thanks,

Muralidhar

FarhanAhmed
Community Champion
Community Champion

Adj EntryDate = 
var partnum = SELECTEDVALUE(Table33[Part Number],Table33[Part Number])
RETURN
CALCULATE(MIN(Table33[Initial Entry Dt]),FILTER(ALL(Table33),Table33[Part Number]=partnum))






Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Hi @FarhanAhmed ,

 

Thanks for the response!

 

As I mentioned earlier, my data has multiple entries with same part number duplicating over the entries with varying initial entry dates. Data will be like

Entry NoPart NumberInitial Entry DtAdj Entry Date
ABC36389906-May-2006-May-20
ABC35795606-May-2006-May-20
ABC36389905-Jun-2006-May-20
ABC36389905-Jun-2006-May-20
ABC35795605-Jun-2006-May-20
ABC35795605-Jun-2006-May-20
ABC32711105-Jun-2006-May-20
ABC32711105-Jun-2006-May-20
ABC25547906-May-2006-May-20
BBC36389901-Jun-1902-Feb-19
BBC35795602-Feb-1902-Feb-19
BBC36389901-Jun-1902-Feb-19
BBC36389901-Jun-1902-Feb-19
BBC35795601-Jun-1902-Feb-19
BBC35795601-Jun-1902-Feb-19
BBC32711101-Jun-1902-Feb-19
BBC32711101-Jun-1902-Feb-19
BBC25547902-Feb-1902-Feb-19

 

Thanks for your help!

 

Regards,

Muralidhar

 

Hi @murali5431 ,

 


 

Entry No Part Number Initial Entry Dt Adj Entry Date
ABC 363899 06-May-20 06-May-20
ABC 357956 06-May-20 06-May-20
ABC 363899 05-Jun-20 06-May-20
ABC 363899 05-Jun-20 06-May-20
ABC 357956 05-Jun-20 06-May-20
ABC 357956 05-Jun-20 06-May-20
ABC 327111 05-Jun-20 06-May-20
ABC 327111 05-Jun-20 06-May-20
ABC 255479 06-May-20 06-May-20
BBC 363899 01-Jun-19 02-Feb-19
BBC 357956 02-Feb-19 02-Feb-19
BBC 363899 01-Jun-19 02-Feb-19
BBC 363899 01-Jun-19 02-Feb-19
BBC 357956 01-Jun-19 02-Feb-19
BBC 357956 01-Jun-19 02-Feb-19
BBC 327111 01-Jun-19 02-Feb-19
BBC 327111 01-Jun-19 02-Feb-19
BBC 255479 02-Feb-19 02-Feb-19

 


Is the column "Adj Entry Date" what you want? If it is, create a column like so:

Adj Entry Date 2 = 
CALCULATE (
    MIN ( 'Table'[Initial Entry Dt] ),
    ALLEXCEPT ( 'Table', 'Table'[Entry No] )
)

adj.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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