Forum Discussion
fonso
5 years agoFrequent Visitor
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 ...
- Anonymous5 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
Anonymous
5 years agoNot applicable
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
fonso
5 years agoFrequent Visitor
Wow! This is great! Thank you 🙂