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 / Powerapps Dictinct fun...
Power Apps
Answered

Powerapps Dictinct function - How to indicate columns name from Combobox.SelectedText

(0) ShareShare
ReportReport
Posted on by 10

Hi every one, I have Table1 with several column names represented product types

Table 16.jpg

Combobox1: Dropdown list of job Product type. Example "450G"

Combobox2: I use Distinct function to list all related jobs from selected product type Combobox 1.SelectedText 

But problem is, Distinct(Table1, Combobox1.SelectedText) doesn't return the list belong to "450G". 

If i say Distinct(Table1,'Apple' ) - it work fine.

Work.jpg

Does anyone can give idea how to indicate column name in Distinct function from Combobox2.SelectedText?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    HI @corsair266 ,

    Distinct produces a single column table of unique values and renames that column "Result".   BTW: .SelectedText is deprecated and may not be supported in the future.  If 'Allow multiple selections is false in your combobox, and you wanted to filter on a column called "product" for example,  then 

     

    Filter(Table1,product=Combobox1.Selected.Result)

     

    if the combobox's Allow multiple selections is true, then it would be 

     

    Filter(Table1, Combobox1.SelectedItems in product)

     

    to filter for several selections in the combobox.  To see how it would work with several comboboxes allowing multiple selections:_1.png

     

  • corsair266 Profile Picture
    10 on at

    Dear Drrickryp, thank you for your explain however that is not the point I would expected.  

    I explain in the picture below. I want to have combobox 2 shows all jobs regarding product type that is selected from combobox 1.

    Thank you in advance

    Explain1.png

  • corsair266 Profile Picture
    10 on at

    Anyone can help for this issue?

    At the moment my Distinct function in combobox 2 doesnt work

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @corsair266 ,

     

    You could try hard-coded.

    You could try this formula on your combo box 2 control.

     

    If(Combobox1.Selected.Value="450G",Distinct(Table1,450G),Combobox1.Selected.Value="475A",Distinct(Table1,475A),....,.....)

     

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard