web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to use Concat, Fil...
Power Apps
Answered

How to use Concat, Filter, and Last in one formula retrieving data from a SP list?

(0) ShareShare
ReportReport
Posted on by 107

Hi guys. Apologies if I started an unnecessary thread.

I please need some help on this. I've got this formula which works great (thanks to you all):

 

Concat(Filter(CWAS_AdvisorActivityTracker;MyProfile.DisplayName=Advisor.DisplayName);'No. of Appointments made';"")
 
However, now when I have 2 of the same users or Advisors in my scenario, with 2 different values for the 'No. of Appointments made', the formula places both values right next to each other in a Text Label.
I want the Last value to display, so I'm thinking I need to add in Last to the above formula, but just not show where? I've played around, but I'm not getting this right, so I'm turning to you guys for some help, please?
 
Example:
Date
12 Feb 2024
18 Feb 2024
Advisor
Jack
Jack
No of Appointments made
7
6
 
I want 6 to be displayed, the last entered value. Currently, its displaying as 76 (placing the 2 values right next to each other).
PS. It'll be a bonus if I can figure out how to display the value based on the date selected for Jack, but I think that's going to take me too long to struggle and try and figure out, so for now, getting the Last value to display would do the job.
 
Thanks in advance.
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    Hi @LugenG ,

    If you simply want to see the latest record

    Concat(
     LookUp(
     Sort(
     CWAS_AdvisorActivityTracker;
     ID;
     SortOrder.Descending
     );
     MyProfile.DisplayName = Advisor.DisplayName
     );
     'No. of Appointments made';
     ""
    )

    but I am not sure that is what you are doing here.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Verified answer
    SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    Hi @LugenG 

     

    I would suggest to use the LookUp function because you only need 1 record. The LookUp function finds the first record in a table that satisfies a formula. Use LookUp to find a single record that matches one or more criteria.

     

    With the Sort function you can sort it to you specific needs. 

    LookUp(
     Sort(
     CWAS_AdvisorActivityTracker;
     Date; // sorting on the most recent date
     SortOrder.Descending
     )
     MyProfile.DisplayName=Advisor.DisplayName
    ).'No. of Appointments made'
    

     If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • LugenG Profile Picture
    107 on at

    Thanks for your help guys. Apologies for this.

     

    Yes, I only want 1 record/value to show.

     

    I basically want to see the last value in the No of Appointments made column based on the Advisor column and the WeekStart column in my SP list.

    Advisor is a person column.

    WeekStart is a date column.

    No. of Appointments made is a number column.

     

    Formula must look for the value in the 'No of Appointments made' column that matches the most recent date in the WeekStart column and the user in the Advisor column.

     

    Hope my explanations helps a little? I tried both those formula's but it does not seem to be working.

  • LugenG Profile Picture
    107 on at

    Got it working, thanks guys, appreciated

     

    The below worked 100%

     

    LookUp(Sort(CWAS_AdvisorActivityTracker;WeekStart;SortOrder.Descending);MyProfile.DisplayName=Advisor.DisplayName).'No. of Appointments made'
  • SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    Good to see that it worked.

    I see, I forget a ; in my code.

     

    Good luck further. 

  • LugenG Profile Picture
    107 on at

    No worries, your advice helped me a lot + at least I got to struggle and learn a little bit more 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard