Forum Discussion

ThomasDay's avatar
ThomasDay
Impactful Individual
10 years ago
Solved

visual filter problem--unpredictable behavior

Hello fellow Daxer's

 

I am displaying 2 text columns, each in it's own visual from a file that I'm filtering using a slicer via a relationship.  I slice the "one" side...and get one record for each year in the related file.  Easy enough.

Photo 1 shows one of the table visuals, filtered by ProviderSlicerCount is 1.  Perfect

Photo 2 shows the other identical visual (different column), filtered by ProviderSlicerCount is 1...and it's weird.

Photo 3 shows the bins so you can see the filter

Photo 4 shows the dax for the ProviderSliderCount

Photo 5 shows that weird visual when I also put the ProviderSliderCount as a field in the table...and it appears as a row??? That doesn't happen with the first one.

 

And this morning I got a frown but only when I put the ProviderSliderCount in as a field.  Any thoughts/workarounds?

8 Replies

  • ThomasDay's avatar
    ThomasDay
    Impactful Individual

    The purpose of the measure--and the reason it's used as an "on the fly" filter is to restrict showing info until a valid selection is made.  That means that until a facility is selected via the slicer (and ONLY ONE facility is selected)--the details in the visuals should not show.   So the ProviderSlicerCount measure is 1--show things, if not 1--don't. 

    Screenshot 1--when a selection is made...all is well and info works well.

    Screenshot 2--when a selection has not been made--nothing should show...and that's the problem.

     

    Does that help size up the issue anyone?  Ideas?  Thanks, Tom

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      ThomasDay Having a hard time following this one. the dax formula is cut off.. is it possible that somehow the filter is only applying to one part of the fact table based on the measure?

      • ThomasDay's avatar
        ThomasDay
        Impactful Individual

        Hi Anonymous--that's the whole filter formula.  The slicer selects a provider from the provider table.  The filter counts the rows in the providertable and if that's one--as in one row, then the details on the visuals are OK to display.  If the slicer has been cleared, the row count will be large, and if more than one is picked, it's not one.  And perhaps there's a time when there are no rows displayed but I can't think of when.

         

        The row count is of the table that the slicer is attached to...so I'm not sure how it might be applying to one part of the fact table.  That help?

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    Hi ThomasDay

    Try this

     

    providerslicercount= If(ISFILTERED(HospProviders[SLICERFIELD]);COUNTROWS(HospProviders))