Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnuchinni
Creator III
Creator 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.





Labels (1)
17 Replies
Anil_Babu_Samineni
MVP
MVP

Are you facing any issue while loading this?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
chinnuchinni
Creator III
Creator III
Author

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

Anil_Babu_Samineni
MVP
MVP

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
chinnuchinni
Creator III
Creator III
Author

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
Creator III
Creator III
Author

for example bill = 200,book =400,

i want to calculate book/bill =2.

Anil_Babu_Samineni
MVP
MVP

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;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
chinnuchinni
Creator III
Creator III
Author



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

Anil_Babu_Samineni
MVP
MVP

Front end / Back end?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
chinnuchinni
Creator III
Creator III
Author

Back End