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

undefined

(0) ShareShare
ReportReport
Posted on by 457

Hi guys,

Please help me.

I am using this function

...................................................................

Distinct(
Filter(
tablname,
1stcoumnoftable= ComboBox1_4.Selected.Result
),
2ndcolumvalue
)

..................................................................................................

Now combobox show 2nd column value. but I want display two value

Ex:

2nd column value is name it has phone number . phonenumber saved in another table such table has 2nd column name value how to retirve phone number and show name with phone in combobox.

Please help me

@Mike8 

@WarrenBelz 

@RandyHayes 

@Pstork1 

@v-xiaochen-msft 

@timl 

@BCLS776 

@Nogueira1306 

@v-bofeng-msft 

@gabibalaban 

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

    @Gelos 

    Distinct is going to return a distinct list of the values in your 2ndcolumnvalue column.

    The problem is - nothing is related to it.

     

    Example, if you have a directory list of people in an organization and the list contains a department column.  If you "Distinct" the department to get a list of departments and then say "I want to show the persons phone number with the department" - What person??  If there are 10 people in a department, which one would you show?

     

    So what is the relationship between the distinct value and other records?  And, how can you narrow it down to just one?

  • Gelos Profile Picture
    457 on at

    I have 2column value in another table. it is unique. So I want to get the value another particular column using the unique value (2nd column value) and show the 2nd column value and the particular column value in drop down

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Gelos 

    Not entirely following what you are stating, but it sounds like each unique/distinct value of the first table has another single value in another table and you want to display both in the dropdown.

     

    I am not sure what other values you want from your dropdown, but at the minimum, your formula would be something like this:

     

    ForAll(
     Distinct(
     Filter(tablname,
     1stcolumnoftable = ComboBox1_4.Selected.Result
     )
     ),
     {1stcolumnoftable: Result,
     2ndcolumnvalue: LookUp(otherTable, someColumn=Result, 2ndcolumnvalue)
     }
    )

     

  • Gelos Profile Picture
    457 on at

    Table 1

    country    code

    Aus          001

    US           001

    IN            002

     

    Table 2

    code  name

    001   jio

    002   Reliance

     

    Now I get value from table using contry distinct and filter function. it show  code value now I want name of code. Then I want to display code as a primary text, name as secondry text.

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Gelos 

    Yes, so the formula I provided will give you what you want.

    In context of your example...

    ForAll(
     Distinct(
     Filter(Table1,
     country = ComboBox1_4.Selected.Result
     ),
     code
     ),
     {code: Result,
     name: LookUp(Table2, code=Result, name)
     }
    )

     

     

  • Gelos Profile Picture
    457 on at

    Thank you so much. It works, but the code value is not ascending order. What should I do for that.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Gelos 

    You can sort on that column.

    Sort(
     ForAll(
     Distinct(
     Filter(Table1,
     country = ComboBox1_4.Selected.Result
     ),
     code
     ),
     {code: Result,
     name: LookUp(Table2, code=Result, name)
     }
     ),
     code
    )

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
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard