Forum Discussion
Find the first occurance by time
- 2 years ago
DavidK85 , In case you need a column
First time =
var _time = minx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) ), [PE Time])
rerurn
minx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) && [PE Time] =_time) , [PE Spread])
Last time =var _time = Maxx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) ), [PE Time])
rerurn
Maxx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) && [PE Time] =_time) , [PE Spread])
In case you need MeasuresFirst time =
var _time = minx(filter(allselected(Table), [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) ), [PE Time])
rerurn
minx(filter(Table, [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) && [PE Time] =_time) , [PE Spread])
Last time =var _time = Maxx(filter(allselected(Table), [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) ), [PE Time])
rerurn
Maxx(filter(Table, [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) && [PE Time] =_time) , [PE Spread])
Latest Date
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
DavidK85 , In case you need a column
First time =
var _time = minx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) ), [PE Time])
rerurn
minx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) && [PE Time] =_time) , [PE Spread])
Last time =
var _time = Maxx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) ), [PE Time])
rerurn
Maxx(filter(Table, [Borrower.Name] = earlier( [Borrower.Name]) && [Pricing Date] = earlier([Pricing Date]) && [PE Time] =_time) , [PE Spread])
In case you need Measures
First time =
var _time = minx(filter(allselected(Table), [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) ), [PE Time])
rerurn
minx(filter(Table, [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) && [PE Time] =_time) , [PE Spread])
Last time =
var _time = Maxx(filter(allselected(Table), [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) ), [PE Time])
rerurn
Maxx(filter(Table, [Borrower.Name] = max( [Borrower.Name]) && [Pricing Date] = max([Pricing Date]) && [PE Time] =_time) , [PE Spread])
Latest Date
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0