Count of the Filtered Results from Ranking

I have filtered my list using Rankx and I have a smaller table of 15 items. However I have been unable to put the COUNT of the filtered table in a Card visual to show that the result is 14 who fulfill the specific criteria (many customers in this ranking have sales above 1.2 million). How does that work?

could you try to give us a image or sample data?
also is import the measures you are using

Yes I think will need to see more here to offer any assistance.

Can you set up a demo file with the scenario, so that we can view everything at play here?

You may want to be using COUNTROWS here maybe if you just want to count up how many rows are left when a table is filtered.

Something like

COUNTROWS( FILTER( …your logic… ) )

Here’s some examples of what I mean


See here for the full post


Deposit Analysis.xlsx (10.3 KB)

Dax Formulation Testing.pbix (76.9 KB)

The spreadsheet and pbx file are uploaded.:

So I would like to :

  1. Count the number of days each distinct deposit was made for the filtered product
  2. Count of deposits that were above $110,000

Please see the data and pbx below…

Ok so I’m a little confused to your first question here.

Counting the number of days each distinct deposit was made for each filter product?

To me there’s nothing is here with really tells me what each distinct deposit is.


It’s just name of different products, not unique identifiers for each.

If this is what you mean by unique then all you need is a simple COUNTROWS like the below.

Total Days = 
COUNTROWS( 'Deposit Analysis' )

If you mean between the start and end date then you need something more like this.

Diff Between Start And End = 
DATEDIFF( MIN( 'Deposit Analysis'[Date] ), MAX( 'Deposit Analysis'[Date] ), DAY )


For question two.

All you need for this is

Deposit Above 100K = 
    FILTER( 'Deposit Analysis',
     'Deposit Analysis'[Amount] > 110000 ) )

You can also use CALCULATE( COUNTROW( Deposit Analysis ), FILTER… as suggested above, this would calculate exactly the same thing.


Just also remember that context of the calculation is key here. I’m just presuming you want this to be in the above context because that’s what made sense to me.

See how you go with this.



Your answers provide perhaps the biggest reason I signed up for membership.

You have completely resolved my issue and also given me additional insights that I had not thought of. Thank you so much. Stay tuned for more queries…