Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

stanley123
New Contributor

Find the highest of two values and replace them.

Hi, i'm looking to compare the ClusterNameFinal and replace the Compliance Score Final that has the lower score with the highest score that has the same ClusterNameFinal.

QlikQuestion.PNG

So the end result would look something like this:

QlikQuestion.PNG

1 Solution

Accepted Solutions
MVP
MVP

Re: Find the highest of two values and replace them.

This is how it can be done in a load script:

2017-12-06 21_30_06-Qlik Sense Desktop.png

and lines from 20 to 29 can of course be replaced with a LOAD ... FROM or LOAD ...; SQL SELECT ...

3 Replies
MVP
MVP

Re: Find the highest of two values and replace them.

In it's simplest form you can use this expression as a Measure:

Max(TOTAL <ClusterNameFinal>  [Compliance Score Final])

2017-12-05 19_26_47-Qlik Sense Desktop.png

The assumption is that the combination of HostNameFinal and ClusterNameFinal only have a single row of data.

stanley123
New Contributor

Re: Find the highest of two values and replace them.

‌hi, thanks for suggesting a solution, but how can this be done in the data load editor instead?

MVP
MVP

Re: Find the highest of two values and replace them.

This is how it can be done in a load script:

2017-12-06 21_30_06-Qlik Sense Desktop.png

and lines from 20 to 29 can of course be replaced with a LOAD ... FROM or LOAD ...; SQL SELECT ...

Community Browser