Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tomwolswijk
Helper I
Helper I

RANX Outflow of Clients

Hi,

By using the RANX function, I understand how to get the new inflow of clients.

However, I am unable to calculate the outflow in a column using the RANX function.

Calculate inflow over time: 

Rank = 
RANKX(FILTER('Table','Table'[Client ID]=EARLIER('Table'[Client ID])),'Table'[Date],,ASC,Dense)

If a client gets Rank "1", this client is new in the dataset (compared with previous date).

Can I also convert this formula so that I can see the outflow of clients?

So that the client gets Rank "1" when a customer is in the data set for the last time (Rank ouflow)?

Client IDDateRank (inflow)Rank (outflow)
101-202013
201-202012
102-202022
202-202021
103-202031
307-202012
308-202021

Regards,

Tom

 

1 ACCEPTED SOLUTION
manikumar34
Solution Sage
Solution Sage

@tomwolswijk

test the same measurement with DESC as follows.

Rank a 
RANKX(FILTER('Table','Table'[Client ID]-EARLIER('Table'[Client ID])),'Table'[Date],DESC,Dense)

Best regards

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

1 REPLY 1
manikumar34
Solution Sage
Solution Sage

@tomwolswijk

test the same measurement with DESC as follows.

Rank a 
RANKX(FILTER('Table','Table'[Client ID]-EARLIER('Table'[Client ID])),'Table'[Date],DESC,Dense)

Best regards

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.