web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Apps - Building Power Apps
Answered

Display Unique Values in Gallery

Like (0) ShareShare
ReportReport
Posted on 28 May 2023 08:48:27 by 39

Hello!

I am trying to display the order numbers in the gallery title. I was able to do it using distinct in the Text property.

 

Distinct('Promotion - Order Table', OrderID)

 

However, I also want to access the dates associated with the OrderID and display it as well as the orderID subtitle. If i use distinct, I can only access the OrderIDs. If i use Groupby, i experience the same problem, I can only access the collection name and its values which are the orderIDs. 

 

Please help. 

 

Thank you!

Categories:
I have the same question (0)
  • marctimothy Profile Picture
    39 on 28 May 2023 at 09:21:59
    Re: Display Unique Values in Gallery

    Hi! Thank you to the both of you! The solutions worked! Been looking for these answers for hours! 

  • Verified answer
    WarrenBelz Profile Picture
    150,917 Most Valuable Professional on 28 May 2023 at 09:16:14
    Re: Display Unique Values in Gallery

    Hi @marctimothy ,

    Try this

    AddColumns(
     GroupBy(
     'Promotion - Order Table', 
     "OrderID",
     "Data"
     ),
     "OrderDate",
     First(Data).'Order Date'
    )

     

    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
    cha_cha Profile Picture
    4,932 Moderator on 28 May 2023 at 09:14:00
    Re: Display Unique Values in Gallery

    Hello @marctimothy 

     

    PowerApps can identify distinct records and you can use a combination of ForAll, Distinct and AddColumns function.

    ForAll(
     Distinct(
     AddColumns('Promotion - Order Table', "IDDate",
     {
     OrderID: OrderID,
     DateColumnName: DateColumnName
     }
     )
     , IDDate),
     ThisRecord.Value
    )

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 885 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 571

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 352 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete