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

Filter datatable by values in two colums

I need help filtering a data table.

 

I have a data table with two column's 'Total_Qty' and 'Min_qty'. I want to only show the records where the total qty is less then the min qty. I am getting an error with my current code. can you please let me know if i can fix this to make it work.

 

MY code

 

Filter('Configs Inventory App', Value(Min_Qty_Column1.Text) > Value(Total_Qty_Column2.Text))

 

 the error

Chrisguff12_1-1635868998447.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
PTBBSolutions
Solution Supplier
Solution Supplier

Please try adding back the Value() before each column. If that doesn't help, try to create the same table in a different screen with the same Item logic - If it works, simply delete and re-create the table you are using (maybe it got cached).

View solution in original post

Ok great that worked 

 

Filter('Configs Inventory App',Value(Total_Qty) < Value(Min_Qty))

 

i do get a Delegation Waring but my rows will never reach 2000 so it will be fine. 

 

Thanks you for your help. 

View solution in original post

14 REPLIES 14
PTBBSolutions
Solution Supplier
Solution Supplier

@Chrisguff12 

 

Can you share the code behind 'LowQtyItemsDataTable'.'Items'?

The code I provided is the only code I have on the data table under property 'Items'

 

Filter('Configs Inventory App', Value(Min_Qty_Column1.Text) > Value(Total_Qty_Column2.Text))

 

PTBBSolutions
Solution Supplier
Solution Supplier

@Chrisguff12 

 

What about the text input controls? Have you set any default properties to them, and if yes - please share the code.

I don't have any text inputs. I was going to also filter the table with a dropdown that would filter by the Category column. but i havent set that up yet.  

PTBBSolutions
Solution Supplier
Solution Supplier

@Chrisguff12 

 

Then what are Min_Qty_Column1 and Total_Qty_Column2 and whey are they coming from?

they are columns names in the data table. they reference the column in this table

Chrisguff12_0-1635876031504.png

 

PTBBSolutions
Solution Supplier
Solution Supplier

@Chrisguff12 

 

You are trying to filter the source from the output - this is causing a circular reference. If your columns are numeric, you don't need the Value() as well.

 

In the Filter statement, refer to the columns from the data source directly, without adding .text

Ok so I changed my code to Filter('Configs Inventory App',Total_Qty < Min_Qty)

Now when I type the Last ")" in the code shows that it is working, after a few seconds the string turns red and gives me this error.

 

do you know why its failing? 

 

 

Chrisguff12_0-1635878109210.png

 

PTBBSolutions
Solution Supplier
Solution Supplier

@Chrisguff12 

 

What is your data source? What are the types of these 2 columns?

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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
Top Kudoed Authors
Users online (3,617)