cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sharuk
Helper IV
Helper IV

Gallery Filter

Hi,

I'm having a gallery. i want filter all the products based on id and whose status is not ordered or dispatched from the datasource. but I'm not sure what i was doing wrong here. i'm getting all the products irrespective of status. below is the formula that i'm using

 

 Filter(orderProducts,Product_ID = SelectedProductID && (Status <> vStatus.ordered || Status <> vStatus.dispatched))

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @Sharuk ,

 

If your Status is a Choice column, you can try this:

Filter(orderProducts,Product_ID = SelectedProductID && Status.Value <> "ordered",Product_ID = SelectedProductID && Status.Value <> "dispatched")

If your Status is a Text column, you can try this:

Filter(orderProducts,Product_ID = SelectedProductID && Status<> "ordered",Product_ID = SelectedProductID && Status<> "dispatched")

Or directly use your vStatus.ordered and vStatus.dispatched to compare with the value:

Filter(orderProducts,Product_ID = SelectedProductID && Status<> vStatus.ordered,Product_ID = SelectedProductID && Status<> vStatus.dispatched)

valbaimsft_0-1627352303411.png

 

Best regards,

Allen

View solution in original post

3 REPLIES 3
Powerplatform01
Post Patron
Post Patron

You can watch this video to resolve your issue

https://youtu.be/bEVMhBW6vm0

Also use

Filter((orderProducts,Product_ID = SelectedProductID) && ((Status <> vStatus.ordered) || (Status <> vStatus.dispatched)))

Powerplatform01
Post Patron
Post Patron

Please like the post and video if your issue is resolved 🙏

v-albai-msft
Community Support
Community Support

Hi @Sharuk ,

 

If your Status is a Choice column, you can try this:

Filter(orderProducts,Product_ID = SelectedProductID && Status.Value <> "ordered",Product_ID = SelectedProductID && Status.Value <> "dispatched")

If your Status is a Text column, you can try this:

Filter(orderProducts,Product_ID = SelectedProductID && Status<> "ordered",Product_ID = SelectedProductID && Status<> "dispatched")

Or directly use your vStatus.ordered and vStatus.dispatched to compare with the value:

Filter(orderProducts,Product_ID = SelectedProductID && Status<> vStatus.ordered,Product_ID = SelectedProductID && Status<> vStatus.dispatched)

valbaimsft_0-1627352303411.png

 

Best regards,

Allen

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,084)