Forum Discussion
hansei
Helper V
6 years agoHelp with Summarize
I'm having trouble understanding summarize and wonder if someone could help me? If I have a table as: NAME1 DATE1 NUM1 harry 1/1/2019 11 harry 3/1/2019 22 harry 2/1/2019 33 sa...
- 6 years ago
I ended up with this for my DAX:
T2 = SUMMARIZE( Table, Table[NAME1], "DATE2", LASTDATE( Table[DATE1] ), "NUM2", CALCULATE( FIRSTNONBLANK( Table[NUM1], 1 ), LASTDATE( Table[DATE1] ) ) )wherein the temporary table returned from LASTDATE propagated filter to orginal Table and then to CALCULATE
hansei
Helper V
6 years agoWhile I know I can do this fairly easily in mashup, I thought SUMMARIZE was the way to go. I ended up with the rather inelegant solution of just adding a calculated column a la
Num2 =
var vc1 = [Name2]
var vltst = [Date2]
var vmatches = FILTER( Table, [Name1] = vc1 && [Date1] = vltst )
return FIRSTNONBLANK( SELECTCOLUMNS( vmatches, "whatever", [Num1] ), 1 )