cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aditya1728
Helper II
Helper II

How to show a label text in a gallery based on another column value of source

Hi Experts,

I have a table like this:

Col 1Col 2
Name 1Lead
Name 2Operational
Name 3Lead
Name 4New
Name 5Operational

 

I have already connected the table in powerapps but in the gallery i want to show names from col 1 but only for "Operational"  value in Col 2

 

I am trying to use this but it is not working:

Filter(Table 1,'Col 2',"Operational")

 

And then for the label in gallery : This item.Col1

 

Appreciate your help.

 

Thanks,

Aditya

6 REPLIES 6
RandyHayes
Super User
Super User

@Aditya1728 

Please consider changing your Formula to the following:

Filter(Table 1, 'Col 2'="Operational")

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks for the reply @RandyHayes , I did try this first but it is not working.

Hi @Aditya1728 ,

Are you using a CDS table as DataSource?
Is your "Col 2" a Choice column?
If yes, you can try this formula:

Filter('Table 1','Col 2'=[@'Col 2'].Operational)

Pay attention to the Choice name inside the Choice column(they may be different):

v-albai-msft_0-1618825719742.png

Best regards,

Allen

RandyHayes
Super User
Super User

@Aditya1728 

Please clarify your datasource if you are still experiencing the issue.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Aditya1728
Helper II
Helper II

@v-albai-msft  No it is not a choice column, a normal table formatted in excel

@RandyHayes Yes still the same problem.

I get the following error:

The requested operation is invalid. Server Response: <Table Name>: Syntax error at position 26 in '<column name> eq '<value sued to filter>'.inner exception Syntax error at position 26 in '<column name> eq '<value sued to filter>'

RandyHayes
Super User
Super User

@Aditya1728 

Can you provide your current formulas for:

- The Gallery Items property.

- The Text properties of the two labels

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,301)