Forum Discussion
Finding Minimum date
Hello all,
Please find the attached. I need to find the minimum snapshot date as highlighed below. A,B,D projects are showing correct minmum date but C & E is not showing correctly. I am adding the dax i used.
CALCULATE(
MIN(table[snap_date]),
ALLEXCEPT(table,
table[project_number],
table[project_status_name],
table[project_owner_name],
table[project_name],
table[project_current_phase_name],
table[product_line_name],
table[Customer C-Sample_date],
table[C-Sample_date],
table[Planned Design Freeze],
table[Design Freeze Status],
table[PPAP Customer],
table[PPAP TEDX])
)
| project_number | project_current_phase_name | Planned Design Freeze | Min Snapshot Date Yes or No | snap_date | project_owner_name | project_status_name | C-Sample_date | PPAP Customer | PPAP TEDX | Design Freeze Status | Customer C-Sample_date |
| A | Production | 2/4/2020 0:00 | 1/26/2023 0:00 | 1/26/2023 0:00 | AB | Active | 6/10/2021 0:00 | 5/6/2021 0:00 | Completed | 2/9/2021 0:00 | |
| A | Production | 2/4/2020 0:00 | 1/26/2023 0:00 | 2/23/2023 0:00 | AB | Active | 6/10/2021 0:00 | 5/6/2021 0:00 | Completed | 2/9/2021 0:00 | |
| A | Production | 2/4/2020 0:00 | 1/26/2023 0:00 | 3/30/2023 0:00 | AB | Active | 6/10/2021 0:00 | 5/6/2021 0:00 | Completed | 2/9/2021 0:00 | |
| B | Validation | 10/1/2020 0:00 | 1/26/2023 0:00 | 1/26/2023 0:00 | AB | Active | 11/29/2021 0:00 | 9/17/2021 0:00 | Completed | 7/2/2021 0:00 | |
| B | Validation | 10/1/2020 0:00 | 1/26/2023 0:00 | 2/23/2023 0:00 | AB | Active | 11/29/2021 0:00 | 9/17/2021 0:00 | Completed | 7/2/2021 0:00 | |
| B | Validation | 10/1/2020 0:00 | 1/26/2023 0:00 | 3/30/2023 0:00 | AB | Active | 11/29/2021 0:00 | 9/17/2021 0:00 | Completed | 7/2/2021 0:00 | |
| C | Validation | 4/26/2021 0:00 | 1/26/2023 0:00 | 1/26/2023 0:00 | AB | Active | 5/1/2023 0:00 | Completed | 3/6/2023 0:00 | ||
| C | Validation | 4/26/2021 0:00 | 2/23/2023 0:00 | 2/23/2023 0:00 | AB | Active | 5/18/2023 0:00 | Completed | 3/23/2023 0:00 | ||
| C | Validation | 4/26/2021 0:00 | 3/30/2023 0:00 | 3/30/2023 0:00 | AB | Active | 6/8/2023 0:00 | Completed | 4/13/2023 0:00 | ||
| D | Validation | 1/18/2022 0:00 | 3/30/2023 0:00 | 3/30/2023 0:00 | AB | Active | 9/1/2023 0:00 | Completed | 5/24/2023 0:00 | ||
| E | Validation | 9/20/2022 0:00 | 1/26/2023 0:00 | 1/26/2023 0:00 | AB | Active | 1/29/2023 0:00 | 2/22/2023 0:00 | Completed | 3/10/2023 0:00 | |
| E | Validation | 9/20/2022 0:00 | 2/23/2023 0:00 | 2/23/2023 0:00 | AB | Active | 3/24/2023 0:00 | 5/4/2023 0:00 | Completed | 5/5/2023 0:00 | |
| E | Validation | 9/20/2022 0:00 | 2/23/2023 0:00 | 3/30/2023 0:00 | AB | Active | 3/24/2023 0:00 | 5/4/2023 0:00 | Completed | 5/5/2023 0:00 |
Hi harshagraj ,
MinOfSnapDate = CALCULATE ( MIN ( 'Table (2)'[snap_date] ), FILTER ( ALLSELECTED ( 'Table (2)' ), 'Table (2)'[project_number] = SELECTEDVALUE ( 'Table (2)'[project_number] ) ) )If I helped, Accept it as a solution.
Regards,
Loran
1 Reply
- MohammadLoran25Solution Sage
Hi harshagraj ,
MinOfSnapDate = CALCULATE ( MIN ( 'Table (2)'[snap_date] ), FILTER ( ALLSELECTED ( 'Table (2)' ), 'Table (2)'[project_number] = SELECTEDVALUE ( 'Table (2)'[project_number] ) ) )If I helped, Accept it as a solution.
Regards,
Loran