1

Topic: count in DAX taking into account the current filter in PowerBi

I try to add a calculated column in the table which will contain a record count taking into account the current applied filter. All built in and  me functions for some reason consider an amount without the filter.
How it is possible it is achieved in the wished?
The same concerns  functions, Rankx, Rank.eq and
How generally to take statistics from the visible (filtered) range?

2

Re: count in DAX taking into account the current filter in PowerBi

Calculated columns settle up during processing and are stored in storage, therefore do not depend on current filters. For your purposes it is necessary to create calculated measures.

3

Re: count in DAX taking into account the current filter in PowerBi

mbabkin wrote:

Calculated columns settle up during processing and are stored in storage, therefore do not depend on current filters. For your purposes it is necessary to create calculated measures.

Thanks for the answer.
It is a little , but
-  a measure countrows in the same table always = 1, in "left" - correct ?
What approach advise for such piece:
- It is necessary in the filtered dial-up will add a column which to contain "top" for N maximum and "bottom" - for N minimum values of some column
?

4

Re: count in DAX taking into account the current filter in PowerBi

I do not understand what analysis you want to lead a little. To display for example in one table both top and bottom likely it is impossible. If it all the same different visualization in the first it is possible to use the standard filter in Power BI Top N.
[img=https://oxcrx34285.i.lithium.com/t5/image/serverpage/image-id/49314iBCF845F9C27AEE8E/image-size/large?v=1.0&px=600]
It is possible at first  by the necessary criteria, then to make Top N.

5

Re: count in DAX taking into account the current filter in PowerBi

mbabkin;
No, to me it is necessary not the standard filter (Top N), and here that is necessary:
directly on page  in which drop down list from 3 elements:
- (blank)
- Top N
- Bottom N
For this purpose, as I understand, the calculated column in the table which will contain "Top N" for the first N records with maximum value of a column and "Bottom N" - for the first N c minimum values is necessary...

6

Re: count in DAX taking into account the current filter in PowerBi

oaken;
It turned out to make demanded with the help [url = [youtube=SsZseKOgrWQ] &vl=en] this video [/url]