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
Unanswered

Powerapps

(0) ShareShare
ReportReport
Posted on by 457

Hi guys,

Please help me.

If use Distinct with filter , I can't show secondary value in combo box why.

@Mike8 

@WarrenBelz 

@RandyHayes 

@Pstork1 

@v-xiaochen-msft 

@timl 

@BCLS776 

@Nogueira1306 

@v-bofeng-msft 

@gabibalaban 

Categories:
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Gelos The Distinct function evaluates a formula across each record of a table and returns a one-column table of the results with duplicate values removed. The name of the column is Result.

    So, the only value you can show in the ComboBox is the Result.

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • Gelos Profile Picture
    457 on at

    So what is solution for my problem. I want show two value in combo box without duplicate. Please help me.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Gelos Can you share more details. What are these two columns that you want to show? What are their data types?

  • Gelos Profile Picture
    457 on at

    I am using cds table. the column data type is text. I want to show company code in dropdown with company name secondary text.  or any other solution please tell me.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Gelos Is the company code not unique?

  • Gelos Profile Picture
    457 on at

    No not unique. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Gelos ,

     

    You could use the formula for the items in your dropdown Distinct(tablename.columnname). That will filter out all the duplicates. Than you could select the company code as primary and the company name as secondary.

    If this doesn't work as expected or when you have another question, please reply.

     

    Kind regards,

    Jaco 

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Gelos Is the Company Code + Company Name combination unique? If so, the following formula will work as seen below,

     

    ForAll(Distinct(myCompanies, myCompanyCode) As _DistinctCode, LookUp(myCompanies, myCompanyCode=_DistinctCode.Result))

    CNT_0-1638473420984.png

     

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Gelos 

    Is the Company Code + Company Name combination unique? If so, the following formula will work as seen below,

     

    ForAll(Distinct(myCompanies, myCompanyCode) As _DistinctCode, LookUp(myCompanies, myCompanyCode=_DistinctCode.Result))

     

     

    CNT_0-1638473420984.png

  • Gelos Profile Picture
    457 on at

    I am using this function

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

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

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

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

    Ex:

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

    Please help me

    It show company

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard