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 / Fetch Unique Values fr...
Power Apps
Unanswered

Fetch Unique Values from a Lookup column

(0) ShareShare
ReportReport
Posted on by 2

I have a requirement to fetch unique column values from a lookup column from a Dataverse table in a PCF component. The table will have huge amount of records(can go more than million)

 

for eg. Please find the sample Table

 

Column A

Column B (Lookup)

Column C (Lookup)

Column A Value A

Column B Value A

Column C Value A

Column A Value B

Column B Value A

Column C Value A

Column A Value C

Column B Value A

Column C Value B

Column A Value D

Column B Value B

Column C Value C

Column A Value E

Column B Value A

Column C Value D

 

I am filtering the table based on Column B and need to fetch the distinct values from Column C

For eg. If I filter Column B = 'Column B Value A'

Expected Result should be 

Column A

Column B (Lookup)

Column C (Lookup)

Column A Value A

Column B Value A

Column C Value A

Column A Value C

Column B Value A

Column C Value B

Column A Value E

Column B Value A

Column C Value D

 

I need to implement it using either WebAPI or FetchXml

For eg. If I filter Column B = 'Column B Value A'

I have the same question (0)
  • Shashank Bhide Profile Picture
    942 Moderator on at

    difficult for me to understand the table structure, because according to your logic there should be 4 out rows not 3

    shashankbhide_0-1715170797857.png

    having said that, if the data volume is going to be large, then you've to be very careful and show the data in pages, because one Dataverse query can return max 5K records, so you've to include paging in your PCF control, also if you loop through the pages and collect the record in PCF, that may crash the browser if the data is really huge besides taking a long time.

  • paul_george Profile Picture
    2 on at

    I need distinct values of colum c. If you look at the table, value of column c of first and second row are same. Hence only first row is considered.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard