Forum Discussion

lgeraeds's avatar
lgeraeds
Frequent Visitor
6 years ago
Solved

Create index with unique values

I am trying to format data which i am extracting from our telephone system. Our telephone system writes an table rule for every step where a phone call goes through (incoming on the main connection, tranferring to the telephone menu, transfering to the department, transfering to an agent, etc.) 

 

The data i want to see is the last step of the phone call which is always answering by an agent. I am trying to achieve this by creating an index so i can get the data of the highest index value, but i am stuck. 

 

An example of my data:

Date/TimeCall ID Telephone number
2020-08-11 12:13:47151680+3161234567
2020-08-11 12:13:47151680+3161234567
2020-08-11 12:13:49151680+3161234567
2020-08-11 12:13:49151680+3161234567
2020-08-11 12:14:02151680+3161234567
2020-08-11 12:14:02151680+3161234567

 

Normally i would do this by creating a customer index with a rankx based on call id and date / time like this: 

 

 

RANKX (
    FILTER ( 'Table', 'Table'[Call ID] = EARLIER ('Table'[Call ID] ) ),
    'Table'[Date/Time],
    ,
    ASC,
    Dense
)

 

 

But as you might understand this gives double index values like 2 times 1, 2 times 2, 2 times 3, etc.

 

I am looking for a method to make an index with unique values, please advice. 

 

Thank you in advance!

3 Replies