Filter/slice help

I have an app that i built during quarantine to log pokemon cards. it was working fine but today I went to my view to filter a certain card and its not showing up as intended.

i clicked through the slice, view, and actions and nothing is glaringly out of place but I havent looked at any of the under the hood stuff since i made the app in feb of last year so ive forgotten alot of what i did to make things work.

I know this is a huge ask but can anyone take a look for me?

Solved Solved
0 6 172
1 ACCEPTED SOLUTION

Iโ€™d also recommend to check out the built-in filtering feature, if you havenโ€™t already: In-App Filtering available for General Availability

View solution in original post

6 REPLIES 6

Hi @aerodactylgrits
Could you please post your filter expression.

I have a view with a dashboard view type that shows 2 additional views of my quick edits and the results. the quick edits are gen, set name, card name, card type, rarity, and owned.

the filter expression is this:

AND(
if(isnotblank(Filter[Gen]), in([Gen], Filter[Gen]), True),
if(isnotblank(Filter[Card Name]), in([Card Name], Filter[Card Name]), True),
if(isnotblank(Filter[Set Name]), in([Set Name], Filter[Set Name]), True),
if(isnotblank(Filter[Rarity]), in([Rarity], Filter[Rarity]), True),
if(isnotblank(Filter[Card Type]), in([Card Type], Filter[Card Type]), True),
if(isnotblank(Filter[Owned]), in([Owned], Filter[Owned]), True)
)

currently nothing shows in the results area. it used to but i think something updated or got tweaked without me realising it.

Possibly related:

If so, a fix is in the works.

From what youโ€™re describing, Iโ€™m thinking Filter is a table with one row?

IsBlank normally evaluates to TRUE for a list containing no values and FALSE for a list containing multiple values, even if the individual values are all blank. However, for a list with one blank value I find the behavior is inconsistent. The server always evaluates IsBlank TRUE while the result in the app varies depending on whether certain optimizations are applied. And it looks like this was affected by an optimization that is being rolled out now.

For discrepancies like this the fix is usually to make the app evaluation consistent with the server. The server behavior in this case seems questionable though, or at least not very intuitive that a list of one blank value should be considered blank if a list with two blank values is considered not blank.

Either way, an immediate workaround would be to modify the expression to avoid relying on the interpretation of IsBlank for lists. If Filter does only have one row you can use ANY() to pull the one value out of the list, so something like this should work:

AND(
  OR(
    IsBlank(ANY(Filter[Gen])),
    [Gen] = ANY(Filter[Gen])
  ),
  OR(
    IsBlank(ANY(Filter[Card Name])),
    [Card Name] = ANY(Filter[Card Name])
  )
  ... 
)

Another option would be to add a virtual column Ref to Filter where the app formula is just the key value of the one row. Then Any(Filter[Column]) above could be replaced by [RefToFilter].[Column].

Iโ€™d also recommend to check out the built-in filtering feature, if you havenโ€™t already: In-App Filtering available for General Availability

this does exactly what i was trying to do. thank you for the info!

Top Labels in this Space