Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

biob_stein
Contributor

connect/map loaded static data with dynamical generated data

Dear Community,

i need to connect data that was previously loaded with data which is generated dynamically with the help of an expression.

The dynamic part need to happen inside the report and not inside the load script.

See picture and attached qvw.

connect.png

How can be achieved this?

5 Replies

Re: connect/map loaded static data with dynamical generated data

Not sure I entirely understand what you are after, but using the Class() function in the GUI could help.

Below pasted form QV Desktop Help :

class(expression, interval [ , label [ , offset ]])

Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.

Examples:

class( var,10 ) with var = 23 returns '20<=x<30'

class( var,5,'value' ) with var = 23 returns '20<= value <25'

class( var,10,'x',5 ) with var = 23 returns '15<=x<25'



... or maybe this blog post from our friend HIC :


          Buckets

biob_stein
Contributor

Re: connect/map loaded static data with dynamical generated data

Hi Bill,

in other words, i want to join the static column "ID" with the dynamically generated column "ID".

Your linked articles concern only how to generate classes. The expression itself is not important, only the fact that i need to join the result of an expression with a static table that was loaded before.

Best regards!

Re: connect/map loaded static data with dynamical generated data

Maybe like this in your load script :

LOAD * INLINE [

    ID, Group

    1,A

    2,B

    3,C

    4,D

];

load

  if(Value<=1.0,1,

  if(Value>1 AND Value<=2.0,2,

  if(Value>2 AND Value<=3.0,3,

  4

  ))) as ID,

  *

;

LOAD * INLINE [

    Value

  0.1,

  0.5,

  1.1

  1.2

  3.0

  4.9

];

biob_stein
Contributor

Re: connect/map loaded static data with dynamical generated data

Hi Bill,

as i wrote in my initial message, a can not put the expression part inside the load script.

The qvw is just a simplified example, imagine the expression uses non-additive” metrics.

So the the belonging to a group can change on select of other dimensions.

That's why i need to generate the group ids dynamically.

Re: connect/map loaded static data with dynamical generated data

Is there a reason why in the load script it has the Decimal Separator as comma and the Thousand Separator as full stop ?

SET ThousandSep='.';

SET DecimalSep=',';

But in the Inline Load for [Value] it has a full stop between 2 digits, as in the Thousand Separator.  And the first 2 values are suffixed by a comma, the Decimal Separator ?

LOAD * INLINE [

    Value

  0.1,

  0.5,

  1.1

  1.2

  3.0

  4.9

];

Easy to sort this in the load script but you say you are forbidden from correcting the load script.

Community Browser