Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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)))

4 Replies
Highlighted
Employee
Employee

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;

Highlighted
Not applicable

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!

Highlighted
MVP & Luminary
MVP & Luminary

Please upload sample data.

Vizlib Head of R&D
Highlighted
Not applicable


try this,

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