Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Hi,

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

ogautier62
Specialist II
Specialist II

Hi,

is this the number that divides the others ?

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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

ogautier62
Specialist II
Specialist II

could you provide a sample with the expected result please ?

Anonymous
Not applicable
Author

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

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

;q.PNG

output= quantity/min_quantity.

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

ujjwalraja
Contributor III
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.