Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
cmano
Contributor II
Contributor II

Script find total

Hello to all.

I am new to this so i need a little help.

I have the below script...how i will find the total values of scrap, reworking & accepted?

(i am gonna need it to calculate the percentage of each condition)

Screenshot 2021-11-05 174846.png

 thanks in advance

9 Replies
AshutoshBhumkar
Partner
Partner

Hello, 

Use Crosstable() to get all the Material Status(Blocked , Reworking, Accepted etc...) Into one single column.

And then you can use those values in set analysis to calculate the percentage.

 

Thanks,

Ashutosh

MarcoWedel

please post some sample data and your expected result

thanks

Marco

cmano
Contributor II
Contributor II
Author

Hello again i dont want to change the raw data...

so i want in this script a sum of (scrap, reworking & accepted) as total.

any ideas?

AshutoshBhumkar
Partner
Partner

Hello,

I am not sure what exactly you are looking for. But is it something like you want to sum the values of scrap, reworking & accepted.

Take a straight table, add PO as Dimension.

And add measure as sum(scrap)+sum(reworking)+sum(accepted)

 

If you want to create a new field adding those three types, you will need to use Group by clause in script.

 

Thanks,

Ashutosh

cmano
Contributor II
Contributor II
Author

Okay how i will add a new field of those 3 types?

cmano
Contributor II
Contributor II
Author

Can i create in the script a new field which i will call it total to be the the sum of (scrap, reworking & accepted)?

Thanks in advanced.

MarcoWedel

Yes, this is possible.
Please post some values and your expected result.

 

cmano
Contributor II
Contributor II
Author

Hello i am afraid i can't share data..it is not possible to write the equation without them?

MarcoWedel

It should not be confidential data of course.
Instead you could create some mock-up values and the result you would expect for those just to clarify your requirements and to create an example to test with.