Documentazione
-
Altre informazioni su: Table.FindText
-
Altre informazioni su: Table.First
-
Altre informazioni su: Table.FirstN
Questo browser non è più supportato.
Esegui l'aggiornamento a Microsoft Edge per sfruttare i vantaggi di funzionalità più recenti, aggiornamenti della sicurezza e supporto tecnico.
Table.LastN(table as table, countOrCondition as any) as table
Restituisce l'ultima o le ultime righe della tabella table
, a seconda del valore di countOrCondition
:
countOrCondition
è un numero, verrà restituito lo stesso numero di righe, a partire dalla posizione (fine - countOrCondition
).countOrCondition
è una condizione, verranno restituite le righe che soddisfano la condizione in posizione crescente finché non viene trovata una riga che non soddisfa la condizione.Trovare le ultime due righe della tabella.
Utilizzo
Table.LastN(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
}),
2
)
Output
Table.FromRecords({
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Trovare le ultime righe in cui [a] > 0 nella tabella.
Utilizzo
Table.LastN(
Table.FromRecords({
[a = -1, b = -2],
[a = 3, b = 4],
[a = 5, b = 6]
}),
each _ [a] > 0
Output
Table.FromRecords({
[a = 3, b = 4],
[a = 5, b = 6]
})
Documentazione
Altre informazioni su: Table.FindText
Altre informazioni su: Table.First
Altre informazioni su: Table.FirstN