Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Scripting

Hi

I'm pretty new to QV, need help with this statement.

I need Sum of Sales Amount only for Active employees.

Please could you send me the correct script

Sum (([Sales Amount]),where[_Active employee]=1)

Thanks

Chris

1 Solution

Accepted Solutions

Re: Scripting

Hi,

in script

LOAD employee,

      sum([Sales Amount])

where wildmatch([_Active employee],'1')

group by employee

Regards

Regards,
Prashant Sangle
10 Replies

Re: Scripting

Hi,

like this,

SUM({<[_Active employee]={'1'}>}[Sales Amount])

Regards

Regards,
Prashant Sangle

Re: Scripting

Load

Employee, Sum (([Sales Amount]) as SalesAmount

resident myTable

where[_Active employee]=1)

Group by Employee

let me know

Re: Scripting

Hi,

in script

LOAD employee,

      sum([Sales Amount])

where wildmatch([_Active employee],'1')

group by employee

Regards

Regards,
Prashant Sangle
Not applicable

Re: Scripting

Hi,

In the script you can use

if([_Active employee]=1,sum([Sales Amount])) as Sales_amount

as use Sales_amount Dimension.

ashwanin
Valued Contributor

Re: Scripting

sum({<Active employee='1'>} Sales)

Arjunarao
Honored Contributor II

Re: Scripting

Hi Chris,

Please try this.

Hope this will Helpful to you.

Capture.JPG

Data:

LOAD employee,

      sum([Sales Amount])

where wildmatch([_Active employee],'1')

group by employee;

Not applicable

Re: Scripting

Thanks, that's perferct

Re: Scripting

Sorry but I think that the answer you marked as correct doesn't work because there isn't the source table in the query....

Arjunarao
Honored Contributor II

Re: Scripting

Hi,

Script is something like this.

Data:

LOAD employee,

      sum([Sales Amount])

      FROM

[QVD\Sales.qvd]

(qvd)

where wildmatch([_Active employee],'1')

group by employee;

Community Browser