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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse Table view w...
Power Apps
Unanswered

Dataverse Table view with distinct values

(0) ShareShare
ReportReport
Posted on by 5,836 Moderator

I need to set a combobox in my Teams Powerapp with distinct values from a Dataverse table text column.   I have been unsuccessful so far.   I thought maybe the solution would be to use a view and have the view only show a list of distinct items, but don't know how I would accomplish this.

 

I do have a view to use for this.     None of the different combinations I have tried actually result in the combobox showing any items.  The TeamName column is the first in the list of field in the combobox property dialog.

I don't have any errors, however there is nothing showing in the combobox.   I could use a dropdown but it doesn't give me access to any of the other columns if I do that.

 

Distinct(Filter(OnCallSchedules, 'OnCallSchedules (Views)'.Teams), TeamName).Result
Distinct(Filter(OnCallSchedules, 'OnCallSchedules (Views)'.Teams), TeamName)
Distinct(OnCallSchedules, TeamName)
Distinct(OnCallSchedules, TeamName).Result

 

emptycb.png

I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I thought I had it resolved.   I needed to add the Result field to the list of fields and move it to be the first field in the list.  But I don't have any access now to the other data.

     

     

    Sort(Distinct(OnCallSchedules, TeamName).Result, Result, SortOrder.Ascending)

     

  • Prakash4691 Profile Picture
    1,332 on at

    @JR-BejeweledOne ,

     

    Try below formula,

     

    Filter(Distinct('Test 1S',Name), 'Test 1S (Views)'.'Active Test 1S')

     

    If it answers your question, kindly give kudo and accept it as solution.

     

     

    Regards,

    Prakash

  • davipilot Profile Picture
    14 on at

    @JR-BejeweledOne try this ...

    Distinct(Filter(OnCallSchedules, Teams),TeamName).Result

     

    Distinct(Filter(OnCallSchedules, 'OnCallSchedules (Views)'.Teams), TeamName).Result

     

    Essentially it would look like:  Distinct(Filter(Table,View),Column).Result

  • snehal_dhane Profile Picture
    17 on at

    Distinct( Table, Formula )

    • Table - Required. Table to evaluate across.
    • Formula - Required. Formula to evaluate for each record.

    1.Insert a button control, and set its OnSelect property to this formula.

    2.Select the button while holding down the Alt key.

    The formula is evaluatd and the collection is created which you can show by selecting in the formula bar.

    3.Insert a data table control, and set its Items property to this formula.

    4.Use the Edit fields link in the data table's properties pane to add the Result column

    5.First( Sort( Distinct( , ), Result ) ).Result

    This formula sorts the results from Distinct with the sort function, takes the first record from the resulting table with the ffunction, and  first extracts the Result field to obtain just the country name.

     

    snehal_dhane

    Thank You

     
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    That works except I don't have access to the other data in the table, which I need.   It's not a huge thing, I am just trying to make the app a little better, but this isn't going to work the way I want it to.

  • Sunidhigambhir1 Profile Picture
    77 on at

    Hello,

    1.add button control, and set its OnSelect property to this formula.

    2.add a data table control, and set its Items property to this formula.

    3.Use the Edit fields link in the data table's properties pane to add the Result column.

    4.Distinct(Filter(Table, View),Column).Result.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard