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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
harshagraj
Post Partisan
Post Partisan

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. 

harshagraj_0-1682012383431.png

 

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_numberproject_current_phase_namePlanned Design FreezeMin Snapshot Date Yes or Nosnap_dateproject_owner_nameproject_status_nameC-Sample_datePPAP CustomerPPAP TEDXDesign Freeze StatusCustomer C-Sample_date
AProduction2/4/2020 0:001/26/2023 0:001/26/2023 0:00ABActive 6/10/2021 0:005/6/2021 0:00Completed2/9/2021 0:00
AProduction2/4/2020 0:001/26/2023 0:002/23/2023 0:00ABActive 6/10/2021 0:005/6/2021 0:00Completed2/9/2021 0:00
AProduction2/4/2020 0:001/26/2023 0:003/30/2023 0:00ABActive 6/10/2021 0:005/6/2021 0:00Completed2/9/2021 0:00
BValidation10/1/2020 0:001/26/2023 0:001/26/2023 0:00ABActive 11/29/2021 0:009/17/2021 0:00Completed7/2/2021 0:00
BValidation10/1/2020 0:001/26/2023 0:002/23/2023 0:00ABActive 11/29/2021 0:009/17/2021 0:00Completed7/2/2021 0:00
BValidation10/1/2020 0:001/26/2023 0:003/30/2023 0:00ABActive 11/29/2021 0:009/17/2021 0:00Completed7/2/2021 0:00
CValidation4/26/2021 0:001/26/2023 0:001/26/2023 0:00ABActive 5/1/2023 0:00 Completed3/6/2023 0:00
CValidation4/26/2021 0:002/23/2023 0:002/23/2023 0:00ABActive 5/18/2023 0:00 Completed3/23/2023 0:00
CValidation4/26/2021 0:003/30/2023 0:003/30/2023 0:00ABActive 6/8/2023 0:00 Completed4/13/2023 0:00
DValidation1/18/2022 0:003/30/2023 0:003/30/2023 0:00ABActive 9/1/2023 0:00 Completed5/24/2023 0:00
EValidation9/20/2022 0:001/26/2023 0:001/26/2023 0:00ABActive1/29/2023 0:002/22/2023 0:00 Completed3/10/2023 0:00
EValidation9/20/2022 0:002/23/2023 0:002/23/2023 0:00ABActive3/24/2023 0:005/4/2023 0:00 Completed5/5/2023 0:00
EValidation9/20/2022 0:002/23/2023 0:003/30/2023 0:00ABActive3/24/2023 0:005/4/2023 0:00 Completed5/5/2023 0:00

@amitchandak 

1 ACCEPTED SOLUTION
MohammadLoran25
Solution Sage
Solution 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

View solution in original post

1 REPLY 1
MohammadLoran25
Solution Sage
Solution 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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors