Forum Discussion

MagikJukas's avatar
MagikJukas
Resolver III
2 years ago
Solved

Min Date selected

Hello, I have the following simple table. When selecting material D and Dates Feb, Mar, Apr, I wish the Measure to show Feb. regardeless the material selected, I want to display the earliest date ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi MagikJukas ,

    I create a table as you mentioned.

    Then I create a new table.

    Table 2 = ADDCOLUMNS(VALUES('Table'[Date]),"Month",FORMAT([Date],"mmm"))

    Also I create a measure and get what you want.

    Measure = 
    VAR _MinDate =
        CALCULATE ( MIN ( 'Table 2'[Date] ), ALLSELECTED ( 'Table 2' ) )
    RETURN
        CONCATENATEX ( FILTER ( 'Table 2', 'Table 2'[Date] = _MinDate ), [Month] )

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.