Forum Discussion
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.
| 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 |
Thank you,
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] ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- FarhanAhmed
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))- murali5431
Helper III
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 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 Thanks for your help!
Regards,
Muralidhar
- Icey
Community Support
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] ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- amitchandak
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
- murali5431
Helper III