Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Select rows with max pay period

Trying to select the rows with the greatest value in Pay Period column.  I want all deductions for the latest period in this d365 table.

Getting an error on this statement:

 

= Table.SelectRows("Filtered Rows", each [PymtDatePeriodNum] = List.Max("Filtered Rows"[PymtDatePeriodNum]))

 

(Error:  "We cannot convert the value "Filtered Rows" to type Table.")

Ideas??

 

 

 

 

 

 

  • Make it

    #"Filtered Rows"

    Hence, following will work

    = Table.SelectRows(#"Filtered Rows", each [PymtDatePeriodNum] = List.Max(#"Filtered Rows"[PymtDatePeriodNum]))

1 Reply

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    Make it

    #"Filtered Rows"

    Hence, following will work

    = Table.SelectRows(#"Filtered Rows", each [PymtDatePeriodNum] = List.Max(#"Filtered Rows"[PymtDatePeriodNum]))