Forum Discussion
Record's Place in Inventory
Hello, I'm trying to identify a specific record's place within our inventory. We have a document library in SharePoint as our dataset connected to Power BI and each folder in that library represents one customer.
I'm trying to figure out a way that I can see exactly what place in line a customer is as well as how many customers are in front of or behind them based upon it's 'Age'.
I've tried using the countrows function but can't seem to figure it out. This is what I have but all I am getting is a '1'.
- Anonymous3 years ago
Hi RGonz1215 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
Place = RANKX(ALLSELECTED('dataset'),'dataset'[age],MAX('dataset'[age]),ASC,Skip)How many clients are in the back = var _total=COUNTROWS(ALL('dataset')) return _total- [Place](3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi RGonz1215 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
Place = RANKX(ALLSELECTED('dataset'),'dataset'[age],MAX('dataset'[age]),ASC,Skip)How many clients are in the back = var _total=COUNTROWS(ALL('dataset')) return _total- [Place](3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.