Reply
Frequent Visitor
Posts: 5
Registered: ‎08-10-2017

Re: Custom column Index or Ranking by other column

You are a genious!!! Saved lots of time . Thanks for the soultion

Regular Visitor
Posts: 16
Registered: ‎04-17-2018

Re: Custom column Index or Ranking by other column

Hi. I'm trying to do something different about the cases exposed. 

 

I have a table that need an increase index when I have some change between three columns. I mean: 

 

WorkerFechaValorIndex
A16/04/2018TRUE1
A16/04/2018TRUE1
A16/04/2018FALSE2
A16/04/2018TRUE3
B15/04/2018TRUE4
B16/04/2018FALSE5
B16/04/2018TRUE6
B16/04/2018TRUE6

 

Starting by 1 in each change of first 3 columns I need to increase the index. I'm trying with all the answer from this post but I can't find the solution. 

 

Other possibility is to save the last combination and the last index in a parameter or another table, but I can't find how to save it in a parameter or table. 

Regular Visitor
Posts: 16
Registered: ‎04-17-2018

Re: Custom column Index or Ranking by other column

[ Edited ]

Hi. I'm trying to do something different about the cases exposed. 

 

I have a table that need an increase index when I have some change between three columns. I mean: 

 

WorkerFechaValorIndex
A16/04/2018TRUE1
A16/04/2018TRUE1
A16/04/2018FALSE2
A16/04/2018TRUE3
B15/04/2018TRUE4
B16/04/2018FALSE5
B16/04/2018TRUE6
B16/04/2018TRUE6

 

Starting by 1 in each change of first 3 columns I need to increase the index. I'm trying with all the answer from this post but I can't find the solution. 

 

Other possibility is to save the last combination and the last index in a parameter or another table, but I can't find how to save it in a parameter or table. 

 

In Excel is very easy because yo can calculate from the information in the last cell, but here I can't. 

 

The excel formula could be: 

 

=SI(A2=A1;SI(C2="FALSE";SI(C1="FALSE";E1;E1+1);SI(C1="FALSE";E1+1;E1));E1+1)

 

 

 

Super User
Posts: 1,620
Registered: ‎09-06-2015

Re: Custom column Index or Ranking by other column

Yes, that's possible. No use for the grouping in this case, as your index shall continue to run. The only thing you need here is a reference to your previous row. For performance reasons, I recommend this method:

https://www.youtube.com/watch?v=xN2IRXQ2CvI

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




Highlighted
Regular Visitor
Posts: 18
Registered: ‎12-26-2016

Re: Custom column Index or Ranking by other column

saving this jewel to favorites!