cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Finnair
Resolver I
Resolver I

Showing the First record of EACH Choice value?

I have a table of Donations records as SQL, and as a Gallery in PowerApps Canvas App Screen. There are columns Department and Donator, both choice columns (there is no relation). First, I want to filter the Gallery by Donator chosen in a Dropdown-A. It's easy. Secondly, I want to show only the first record of each Department, and other values within the record.

 

First I thought it must be Distinct for showing the first record of each Department. But it might not be since it returns "Result" which I find difficult to handle in this case.

 

What would it be the right function?

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Finnair,

What do you mean by Choice columns of Department and Donator? There is no Choice type in SQL.

How you set the Items property of the two dropodwn corresponding to the Department and Donator?

 

Further, whether you want to display the first record of each Department based on the Donator chosen or not.

 

You could get the first record of each Department directly using the GroupBy() function. However you should note that the GroupBy only supports the Text column type.

 

Not sure if you have resolved your problem, I have a test on my side, please take a try as below.

AddColumns(GroupBy(ScoreList,"ReType","TypeG"),"testG",First(TypeG))

vqiaqimsft_0-1649220253660.png

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
Finnair
Resolver I
Resolver I

I turned to using GroupBy instead.

v-qiaqi-msft
Community Support
Community Support

Hi @Finnair,

What do you mean by Choice columns of Department and Donator? There is no Choice type in SQL.

How you set the Items property of the two dropodwn corresponding to the Department and Donator?

 

Further, whether you want to display the first record of each Department based on the Donator chosen or not.

 

You could get the first record of each Department directly using the GroupBy() function. However you should note that the GroupBy only supports the Text column type.

 

Not sure if you have resolved your problem, I have a test on my side, please take a try as below.

AddColumns(GroupBy(ScoreList,"ReType","TypeG"),"testG",First(TypeG))

vqiaqimsft_0-1649220253660.png

 

Best Regards,
Qi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,764)