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

Community site session details

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

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:
I have the same question (0)
  • PTBBSolutions Profile Picture
    691 on at
    Re: Filter datatable by values in two colums

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filter datatable by values in two colums

    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
    Re: Filter datatable by values in two colums

    @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
    Re: Filter datatable by values in two colums

    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
    Re: Filter datatable by values in two colums

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filter datatable by values in two colums

    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
    Re: Filter datatable by values in two colums

    @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
    Re: Filter datatable by values in two colums

    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
    Re: Filter datatable by values in two colums

    @Chrisguff12 

     

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

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filter datatable by values in two colums

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard