Forum Discussion
Pmike
8 years agoAdvocate I
Creating New Table by Summarizing rows based on Latest Date
I have the following question on creating a new table. My table consists of the following example: CURRENT TABLE Customer Date Image A 10/1/2017 Image 1 ...
- 8 years ago
If you want a calculated table. Try this.
Go to modelling tab...Press "New Table"New Table = ADDCOLUMNS ( SUMMARIZE ( CurrentTable, CurrentTable[Customer], "Max Date", MAX ( CurrentTable[Date] ) ), "Image", CALCULATE ( SELECTEDVALUE ( CurrentTable[Image] ), FILTER ( CurrentTable, CurrentTable[Date] = [Max Date] && CurrentTable[Customer] = EARLIER ( CurrentTable[Customer] ) ) ) )
Zubair_Muhammad
8 years agoCommunity Champion
If you want a calculated table. Try this.
Go to modelling tab...Press "New Table"
New Table =
ADDCOLUMNS (
SUMMARIZE (
CurrentTable,
CurrentTable[Customer],
"Max Date", MAX ( CurrentTable[Date] )
),
"Image", CALCULATE (
SELECTEDVALUE ( CurrentTable[Image] ),
FILTER (
CurrentTable,
CurrentTable[Date] = [Max Date]
&& CurrentTable[Customer] = EARLIER ( CurrentTable[Customer] )
)
)
)Pmike
8 years agoAdvocate I
Thanks Zubair, this was exactly what I was looking to accomplish.