Forum Discussion

fonso's avatar
fonso
Frequent Visitor
5 years ago
Solved

Minimun Date from Table

Hello all,   I have the following table:   Dim1 Dim2 Dim3 Measure1 Measure2 Measure3 Date Obj1 Prop1 New 2.5     8/1/2021 Obj1 Prop1 New ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  fonso ,

    Here are the steps you can follow:

    1. Create measure.

    Measure1 =
    var _mindate=MINX(FILTER(ALL('Table'),'Table'[Dim1]=MAX('Table'[Dim1])&&'Table'[Dim2]=MAX('Table'[Dim2])&&'Table'[Dim3]=MAX('Table'[Dim3])),[Date])
    return
    IF(MAX('Table'[Date])=_mindate,
    CALCULATE(SUM('Table'[Column1]),FILTER(ALL('Table'),'Table'[Date]=_mindate)),BLANK())
    Measure2 =
    var _mindate=MINX(FILTER(ALL('Table'),'Table'[Dim1]=MAX('Table'[Dim1])&&'Table'[Dim2]=MAX('Table'[Dim2])&&'Table'[Dim3]=MAX('Table'[Dim3])),[Date])
    return
    IF(MAX('Table'[Date])=_mindate,
    CALCULATE(SUM('Table'[Column2]),FILTER(ALL('Table'),'Table'[Date]=_mindate)),BLANK())
    Measure3 =
    var _mindate=MINX(FILTER(ALL('Table'),'Table'[Dim1]=MAX('Table'[Dim1])&&'Table'[Dim2]=MAX('Table'[Dim2])&&'Table'[Dim3]=MAX('Table'[Dim3])),[Date])
    return
    IF(MAX('Table'[Date])=_mindate,
    CALCULATE(SUM('Table'[Column3]),FILTER(ALL('Table'),'Table'[Date]=_mindate)),BLANK())

    2. Result:

     

    Best Regards,

    Liu Yang

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