# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
Not applicable

## Levenshtein Algorithm

Dear All,

Does anyone try to apply Levenshtein algorithm in QlikView?

Regards,

Omer

Tags (3)
19 Replies
MVP

## Re: Levenshtein Algorithm

I am not hear about that can you explain more about the Levenshtein algorithm.

Contributor III

## Re: Levenshtein Algorithm

Hi Omer,

This is indeed but just to let you know Levenshtein is not implemented yet in QlikView. Few months before I was wondering for a matrix which could be utilize to measure the period or distance between two things (Months, Days, Years or anything). I believe the most common way to calculate this is by dynamic approach, may be VB script, C# or Java program but this is not the feature of QlikView. I tried and played with variables but did not succeeded.

As of now there is no functions which fulfill levenshtein algorithm in QlikView till version SR6.

I marked this as a priority, as the need for such analysis is present in market.

I hope this is informative and hence request to mark this so other community users can get instant results of the post/questions.

Regards

MVP

## Re: Levenshtein Algorithm

String Comparison

MVP

## Re: Levenshtein Algorithm

Hi Omer,

although it might not be the fastest solution (in terms of execution time), this application might help:

```tabLevenshteinDistances:
*,
levenshtein(A,B) as LevDistAB
Inline [
A,B
kitten,sitting
saturday,sunday
book,back
table,able
cellar,door
qlik,click
];

```

It's just a copy/paste-solution using a VBScript function found at wikibooks:

http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#VBScript

The reload execution time for a 1.000.000 rows xlsx table raised from 45sec to 2min 58sec when adding the levenshtein distance calculation.

hope it might be of any use though

regards

Marco

Not applicable

## Re: Re: Levenshtein Algorithm

Hello,

Here is result of my attempts to implement Levenshtein Algorithm

I want to think about how to change the formulas to improve presentation:

- by transfer it to pivot ..
- by using Aggr ()

I think that there should be also possible to create some extension for it...

Regards
Darek

Not applicable

## Re: Re: Re: Levenshtein Algorithm

Here is version 3.

User may at the application level input string to search.

regards

Darek

Not applicable

## Re: Levenshtein Algorithm

Hi guys,

Thanks a lot for the help.

It really help me.

Regards,

Omer

MVP

wow

Not applicable

## Re: Levenshtein Algorithm

29-04-2014 17:28 użytkownik "Marco Wedel" <qcwebmaster@qlik.com>

napisał:

Qlik Community <http://community.qlik.com/> Levenshtein Algorithm