Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filter datatable by values in two colums

Posted on by 223

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:
  • Verified answer
    Chrisguff12 Profile Picture
    Chrisguff12 223 on at
    Re: Filter datatable by values in two colums

    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. 

  • Verified answer
    PTBBSolutions Profile Picture
    PTBBSolutions 698 on at
    Re: Filter datatable by values in two colums

    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).

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

    they are spelled correctly 

     

    Chrisguff12_0-1635884131552.png

     

    Maybe there is a different way to filter the Data table.

     

    this is a small part of my data i want this table to only View record 19. because the amount is lower  

    Chrisguff12_1-1635884374591.png

     

     

     

     

  • PTBBSolutions Profile Picture
    PTBBSolutions 698 on at
    Re: Filter datatable by values in two colums

    @Chrisguff12 

     

    Are you sure the columns are spelled the correct way? Could you please add a galary and set it's items property to  'Configs Inventory App'. After that check if these columns are visible when you start typing 'thisitem. ...' in one of the labels in that gallery. Check how they are spelled - there might be a difference between how SP is displaying them and how powerapps is reading them.

  • Chrisguff12 Profile Picture
    Chrisguff12 223 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 

  • PTBBSolutions Profile Picture
    PTBBSolutions 698 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
    Chrisguff12 223 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
    PTBBSolutions 698 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
    Chrisguff12 223 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
    PTBBSolutions 698 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?

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard