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.
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.
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.
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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,793)