web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter datatable by va...
Power Apps
Answered

Filter datatable by values in two colums

(0) ShareShare
ReportReport
Posted on by 233

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

 

 

Categories:
  • PTBBSolutions Profile Picture
    691 on at

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at

    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 Profile Picture
    691 on at

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at

    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 Profile Picture
    691 on at

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at

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

    Chrisguff12_0-1635876031504.png

     

  • PTBBSolutions Profile Picture
    691 on at

    @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

  • Chrisguff12 Profile Picture
    233 on at

    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 Profile Picture
    691 on at

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at

    I'm using SharePoint

    data source = 'Configs Inventory App'

    data table = LowQtyItemsDataTable

    both columns are number 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard