Forum Discussion

GregMorgan's avatar
GregMorgan
New Member
5 years ago

Filtering on a Card

Hello,

 

I am trying to create a filter on a card that shows the total number of territories that have a variance that is greater than zero.  For example, suppose this is the list of territories and sales variances:

 

Territory 1       $+1,000

Territory 2       $+2,000

Territory 3       $-1,500

Territory 4       $-3,000

Territory 5       $+4,000

 

When I initially create the card and do a distinct count on the territories, it shows that I have 5 territories.  I would like to add a filter based on the variance so that the total only includes territories that have a variance >0 (in this case 3).  When I add the filter to the card, the options are greyed out so that I cannot filter.

 

Any ideas?

 

Thanks

Greg

 

 

9 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    can you post a screen shot of what you are doing to filter it?  also a screen shot of your data  and how it is structured.

  • Thanks for your quick response!  Below is a screen show of the card and filters:

     

     

     

    The card above is based on a distinct count of territories.  24 is the total, but I want to only show the number of territories that have a variance that is greater than zero.  But as you can see, the "$ Variance" filter is greyed out.

     

    My data (in a table view) looks as follows, the data in this table is aggregated based on detailed rows.  (On the left are the territory names, I have cut off most of them).  I want the care to only show the total territories that have a "$ Variance" >0

     

     

    Let me know if you need additional information.

     

    Thanks

    Greg

     

     

    • GregMorgan's avatar
      GregMorgan
      New Member

      My first screen shot did not post for some reason, please see below:

       

      • vanessafvg's avatar
        vanessafvg
        Community Champion

        that doesn't look greyed out to me have you tried to drop it down?  

         

        you could however manage this with a dax calculation

         

        Unique Territories with variance =
        VAR varonly =
            IF ( SUM ( table[variance] ) > 010 )
        RETURN
            CALCULATE (
                DISTINCTCOUNT ( table[territory] ),
                FILTER ( table, variances = 1 )
            )