Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,
Can you explain the logic to find the common number 10. You mean the no of occurrence of number???
Hi,
is this the number that divides the others ?
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.
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.
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
could you provide a sample with the expected result please ?
Sample ans would be like, i can make 2 finished goods item from these materials. Because i need 5000 quantity of each raw materials.
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?
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.