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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.