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 Apps
Answered

Formula help

(0) ShareShare
ReportReport
Posted on by 7

Hello All,

 

Need help to solve one tricky case.
I have a string "1_2_3_14" but I need to extract everything till third "_" so the answer would be "1_2_3"

*Third element in my case is a variable. Sometimes it needs to be third, sometimes fourth element.

 

Any help highly appreciate 🙂

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @Phillip92 ,

     

    Concat(
     FirstN(
     Split(
     "1_2_3_14",
     "_"
     ),
     3
     ),
     Value,
     "_"
    )

     

    In the above you can replace the string with a dynamic value. Also you can replace the 3 with a dynamic value which allows you to determine the number of items to be included in the outcome.

  • Phillip92 Profile Picture
    7 on at

    Works as expected 🙂 thanks for quick help

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard