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.

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,186)