Forum Discussion
zanottiluca
Helper II
7 years agoRetrieve last record based on 2 sortings
Hi guys, I am struggling with a DAX computation: in brief I would like to retrieve the latest record in a group by two sorting order. The first is based on the Invoice number descending, but if wit...
- 7 years ago
try this as Calculated Table
Calculated Table = GENERATE ( SELECTCOLUMNS ( VALUES ( 'Table1'[Groupid]), "Groupid_", [Groupid] ), CALCULATETABLE ( TOPN ( 1, 'Table1', [InvoiceN], DESC,[Modified Date],DESC ) ) )
Zubair_Muhammad
Community Champion
7 years ago
try this as Calculated Table
Calculated Table = GENERATE ( SELECTCOLUMNS ( VALUES ( 'Table1'[Groupid]), "Groupid_", [Groupid] ), CALCULATETABLE ( TOPN ( 1, 'Table1', [InvoiceN], DESC,[Modified Date],DESC ) ) )
zanottiluca
Helper II
7 years agoHi,
Zubair_Muhammad . many thanks for this it worked and you opened a new "world" about calculated tables.
Many thanks for this
Luca
Zubair_Muhammad wrote:
try this as Calculated Table
Calculated Table = GENERATE ( SELECTCOLUMNS ( VALUES ( 'Table1'[Groupid]), "Groupid_", [Groupid] ), CALCULATETABLE ( TOPN ( 1, 'Table1', [InvoiceN], DESC,[Modified Date],DESC ) ) )
Zubair_Muhammad wrote: