Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Cbutler
Helper III
Helper III

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 nameDateAnswer (Yes/No)
A01/05/2020Yes
A02/05/2020 
A03/05/2020 
A04/05/2020No
A05/05/2020Yes 
B01/05/2020 

B

02/05/2020No
B03/05/2020 
B04/05/2020Yes
B05/05/2020 
C01/05/2020No
C02/05/2020 
C03/05/2020Yes
C04/05/2020No
C05/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 5
Greg_Deckler
Super User
Super User

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


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Cbutler , try like

LastNONBLANKVALUE(Table[Date],Max(Table[Answer])

or

maxx(summarize(table,table[Provider name],"_1",LastNONBLANKVALUE(Table[Date],Max(Table[Answer]))),[_1])

 

 

@amitchandak  can you tell me how to display the "date" of the last non blank value from the same table? 

@Cbutler That's the Lookup Min/Max pattern I sent, https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Still not able to return the date for the last nonblank value 😞

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.