Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
chinnuchinni
Contributor III

How to perform division operation in script side

Hi Everybody,


my script is like below


sale:


LOAD Name,

Prd.Cat.No,

Sales,

'bill' as Category

FROM

(ooxml, embedded labels, table is Sheet1) where Prd.Cat.No =101;

Concatenate

LOAD Name,

Prd.Cat.No,

Sales,

'book' as Category

FROM

(ooxml, embedded labels, table is Sheet1) where Prd.Cat.No =102;


so i want to create one another table which is category type as   "book / bill"



which is like



LOAD Name,

Prd.Cat.No,

Sales,

'book / bill' as Category

FROM

(ooxml, embedded labels, table is Sheet1) ;



How it is possible in script ?????????


Thanks in Advance.





17 Replies

Re: How to perform division operation in script side

Are you facing any issue while loading this?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
chinnuchinni
Contributor III

Re: How to perform division operation in script side

no,but i want to find the value " book / bill " sales  in script side.

Re: How to perform division operation in script side

What are you getting When you use this as filter "Category". I meant to say please paste this field in list box?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
chinnuchinni
Contributor III

Re: How to perform division operation in script side

Here category is a flag.when i select the " bill " from category  it will give bill info,when i select the " book " from category  it will give book info, as well as i want to find " book / bill " value when i select the book/bill from category.

Hope you understand

chinnuchinni
Contributor III

Re: How to perform division operation in script side

for example bill = 200,book =400,

i want to calculate book/bill =2.

Re: How to perform division operation in script side

Try to reply who you want to help. Not entirely sure, What you want to achieve here. can you make it simple using Inline tables

sale:

LOAD Name, Prd.Cat.No, Sales, 'bill' as Category

FROM

(ooxml, embedded labels, table is Sheet1) where Prd.Cat.No =101;

Concatenate

LOAD Name, Prd.Cat.No, Sales, 'book' as Category

FROM

(ooxml, embedded labels, table is Sheet1) where Prd.Cat.No =102;

LOAD Name, Prd.Cat.No, Sum(Sales) as Sales, 'book / bill' as Category

FROM

(ooxml, embedded labels, table is Sheet1) Where Match(Prd.Cat.No, 101, 102) Group By Name, Prd.Cat.No;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
chinnuchinni
Contributor III

Re: How to perform division operation in script side



Sample:

LOAD * INLINE [

    Name, Prd.No, Sales

    abc, 101, 120

    xyz, 101, 180

    pqr, 101, 270

    abc, 102, 30

    xyz, 102, 60

    pqr, 102, 90

];


load Name,

Sales,

Prd.No,

'Bill' as Category


Resident Sample Where Prd.No = 101;



load Name,

Sales,

Prd.No,

'Book' as Category


Resident Sample Where Prd.No = 102;



****

now i want to calculate  another table which is "bill / book" ca category type


need to get " bill/book " =3


Capture.PNG

Re: How to perform division operation in script side

Front end / Back end?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
chinnuchinni
Contributor III

Re: How to perform division operation in script side

Back End