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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Michsara
Regular Visitor

Latest text value - fixed on customer

Hi all

 

I'm very new to PowerBI and I'm trying to move my Tableau dashboards over, however I'm extremely stuck and none of the questions/answers on the forum have helped so far.

 

I need to add a column showing the last person who contacted a company.

 

for example - the table looks like this....

DateCustomerContacted by
01/03/2021SmithsSally
28/02/2021SmithsJohn
12/02/2021HammondsSally
02/03/2021SmithsPeter
22/01/2021HammondsJohn
14/11/2020CartwrightsPeter
03/03/2020CartwrightsHannah
21/01/2021HammondsKeith

 

The results should be....

DateCustomerContacted byLast contacted by
01/03/2021SmithsSallyPeter
28/02/2021SmithsJohnPeter
12/02/2021HammondsSallySally
02/03/2021SmithsPeterPeter
22/01/2021HammondsJohnSally
14/11/2020CartwrightsPeterPeter
03/03/2020CartwrightsHannahPeter
21/01/2021HammondsKeithSally

 

I've tried.....

Last Contacted by = LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By]))
but this just puts the last contact person for each line (not fixed on the customer)
 
My working Tableu formula is: {FIXED [Date] = {FIXED [Customer] : MAX ([Date])} then [Contacted by] end)}
 
Thanks in advance
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Michsara , Try like

 


Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),allexpect('Table','Table'[customer]))

 

or


Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),filter(allselected('Table'),'Table'[customer] = max('Table'[customer])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Michsara , Try like

 


Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),allexpect('Table','Table'[customer]))

 

or


Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),filter(allselected('Table'),'Table'[customer] = max('Table'[customer])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That's fantastic - the first option worked.  Thank you so much 😊

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.