Forum Discussion

Bansi008's avatar
Bansi008
Helper III
2 years ago
Solved

How to calculate minimum date based security column.

Hi there,

Can someone please help me here to calculate the minimum date in a separate column based on the security column. 

 

sample input data:- 

SECURITYDATE
Amazone6/30/2024
Flipkart6/30/2024
Myntra6/30/2024
Ajio6/30/2024
Alibaba6/30/2024
Flipkart3/31/2024
Amazone3/31/2024
Myntra3/31/2024
Alibaba3/31/2024
Ajio3/31/2024

 

Expected output:- 

SECURITYDATEMIN_DATE
Amazone6/30/20243/31/2024
Flipkart6/30/20243/31/2024
Myntra6/30/20243/31/2024
Ajio6/30/20243/31/2024
Alibaba6/30/20243/31/2024
Flipkart3/31/20243/31/2024
Amazone3/31/20243/31/2024
Myntra3/31/20243/31/2024
Alibaba3/31/20243/31/2024
Ajio3/31/20243/31/2024
  • hello Bansi008 

     

    please check if this accomodate your need.

    MIN_DATE =
    MINX(
        FILTER(
            'Table',
            'Table'[SECURITY]='Table'[SECURITY]&&
            'Table'[DATE]<=EARLIER('Table'[DATE])
        ),
        'Table'[DATE]
    )

     

    Hope this will help you.

    Thank you

3 Replies

  • hello Bansi008 

     

    please check if this accomodate your need.

    MIN_DATE =
    MINX(
        FILTER(
            'Table',
            'Table'[SECURITY]='Table'[SECURITY]&&
            'Table'[DATE]<=EARLIER('Table'[DATE])
        ),
        'Table'[DATE]
    )

     

    Hope this will help you.

    Thank you