# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for
Search instead for
Did you mean:
Creator

## Take out common among the numbers

Hi,

Need a help. Suppose i have three numbers. From these numbers i have to find out the common number.

Example :

A, X, 10

B, X, 20

C, Y, 30

Here, 10 is common between these numbers.

How can i do it in Qlik?

Thanks in advance

11 Replies
Highlighted
Creator III

Hi,

Can you explain the logic to find the common number 10. You mean the no of occurrence of number???

Highlighted
Specialist II

Hi,

is this the number that divides the others ?

Highlighted
Creator

Logic is that, in 10 there is 10. And in 20 there 10+10, so 10 is common. and in 30 there maybe like 20+10 or 10+10+10. So 10 is common in all the numbers.

Highlighted
Creator

Logic is that, in 10 there is 10. And in 20 there 10+10, so 10 is common. and in 30 there maybe like 20+10 or 10+10+10. So 10 is common in all the numbers.

Highlighted
Creator

Actually my requirement is that, I have three raw materials of Quantity 10000, 20000, 30000. From there to produce a finish good I need 5000 of each of the raw materials.

If this is so, then with these materials how many finish goods can be produced.

I have to show this calculation.

Thanks in advance

Highlighted
Specialist II

could you provide a sample with the expected result please ?

Highlighted
Creator

Sample ans would be like, i can make 2 finished goods item from these materials. Because i need 5000 quantity of  each raw materials.

Highlighted
Creator III

Table1:

LOAD * INLINE [

Material,goods,quantity

A, X, 10

B, X, 20

C, Y, 30

];

Join (Table1)

LOAD Min(quantity) as min_quantity

Resident Table1

;

output= quantity/min_quantity.

how to find out the minimum required raw materials? Is it always 5000 quantity of raw materials?

Highlighted
Contributor III

T1:

LOAD * INLINE [

Material,goods,quantity

A, X, 10

B, X, 20

C, Y, 30

];

let v_min=5; //define min number of raw material required for output

temp:

LOAD

*, Floor(quantity/\$(v_min)) as NumberRequired

Resident T1

;

drop Table T1;

NoConcatenate

Final:

Load *

Resident temp

order by NumberRequired asc;

drop table temp;

let v_required= peek('NumberRequired',0,'Final'); //this is the final amount of goods that can be produced.

Now You can add \$(v_required) in your straight table to show it.