Forum Discussion
Lobo1908
Helper I
3 years agoFind a code in a string with the highest rank
Hi, I have a lookup table with a list of codes and a rank assigned against each code. The lookup table looks as follows: Code Rank DI0001 1 DI0002 1 DI0003 2 DI000...
- Anonymous3 years ago
Hi Lobo1908 ,
I have created a simple sample, please refer to it to see if it helps you.
Create measures.
code1 = RIGHT(MAX('Table'[Code]),2)Measure = VAR _1 = RIGHT ( MAX ( 'Table (2)'[Codes ] ), 2 ) RETURN CALCULATE ( MAX ( 'Table'[Rank ] ), FILTER ( ALL ( 'Table' ), [code1] = _1 ) )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HotChilli
Community Champion
3 years agoI think I would split that Codes column 'To Rows' and either use the other table as a dimension table or a disconnected table and write a reasonably straightforward MAX measure.