Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to get this expression on Script??

Hi everyone,


How can I get this expression "LOTES" on the script:

count(distinct(aggr(Nro.Lote,Nro.Mat,Nro.Lote,Período)))

So then I cant get this Expression on the script too:

if ([Lotes]<=7,([Lotes]/1)*([AhorroHsComp]), if ([Lotes]>7 ,([Lotes]/4)*(AhorroHsComp)))

Tags (4)
4 Replies
Employee
Employee

Re: How to get this expression on Script??

LOAD

count(distinct Nro.Lote)

from yourqvd

group by Nro.Mat,Nro.Lote,Período;

LOAD

if ([Lotes]<=7,([Lotes]/1)*([AhorroHsComp]), if ([Lotes]>7 ,([Lotes]/4)*(AhorroHsComp))) as newfield

from yourqvd;

Not applicable

Re: How to get this expression on Script??

Clever... does not work your soolution.

its returns '1'

I got this in a graph:

  The column Lotes is:

   count(distinct(aggr(Nro.Lote,Nro.Mat,Nro.Lote,Período)))

 

     I need to have this values already on the script!

MVP
MVP

Re: How to get this expression on Script??

Please upload sample data.

Not applicable

Re: How to get this expression on Script??


try this,

aggr(count(distinct(Nro.Lote,Nro.Mat,Nro.Lote,Período)))

Community Browser