Forum Discussion
How to return the latest text value depending on a date range
Hi all,
I can't work out how to return the latest text value in my table depending on a date range. So my table is showing PPE concernes from providers, they will not anser this question each time just complete if the answer changes - I want to show the last text input
eg
| Provider name | Date | Answer (Yes/No) |
| A | 01/05/2020 | Yes |
| A | 02/05/2020 | |
| A | 03/05/2020 | |
| A | 04/05/2020 | No |
| A | 05/05/2020 | Yes |
| B | 01/05/2020 | |
B | 02/05/2020 | No |
| B | 03/05/2020 | |
| B | 04/05/2020 | Yes |
| B | 05/05/2020 | |
| C | 01/05/2020 | No |
| C | 02/05/2020 | |
| C | 03/05/2020 | Yes |
| C | 04/05/2020 | No |
| C | 05/05/2020 |
So.....
if date range selected is 01/05/2020 to 05/05/2020 then Provder A = Yes, B = Yes, C = No.
If date range selected is 01/05/2020 to 03/05/2020 then Provider A = Yes, B = No, C = Yes.
If date range selected is 01/05/2020 to 01/05/2020 then Provider A = Yes, B = "Blank/Not completed", C = No
Can anyone help me please......?
5 Replies
- Greg_Deckler
Community Champion
I believe you want Lookup Min/Max: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
Or LookupValue Range: https://community.powerbi.com/t5/Quick-Measures-Gallery/LOOKUPVALUE-Range/m-p/974201#M430
- amitchandak
Super User
Cbutler , try like
LastNONBLANKVALUE(Table[Date],Max(Table[Answer])
or
maxx(summarize(table,table[Provider name],"_1",LastNONBLANKVALUE(Table[Date],Max(Table[Answer]))),[_1])
- Cbutler
Helper III
amitchandak can you tell me how to display the "date" of the last non blank value from the same table?