Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have a small problem getting the max function right.
I will like to do this in a table in QV:
=if (max (length, width, height) = length (then) 1 else (0) but I can not get it right.
And I need to do the same with median and min.
Anybody with a little help?
Best regards
Bjarne
Hi,
RangeMax function will help you to do this.
Your expression should be some thing like below.
IF(RangeMax(Length,Hieght,Width) = Length,1,0)
Check the attached application.
Hope this helps you.
-Sridhar
can you explain a little bit more on the data structre
Max() only takes a single expression (plus a rank) so I'm guessing you are looking more for:
IF(Length=Max(Length),1,0)
IF(Width=Max(Width),1,0)
IF(Height=Max(Height),1,0)
IF(Length=Median(Length),1,0)
IF(Width=Median(Width),1,0)
IF(Height=Median(Height),1,0)
IF(Length=Min(Length),1,0)
IF(Width=Min(Width),1,0)
IF(Height=Min(Height),1,0)
Is this what you were after?
Jason
I'll try
I have an article 1234567 and the length of this collie is 40, the width is 30 and the height is 20. Then i'll check if the length is the highest value, if the width is the median and if the height is the smallest.
In excel i could like this. Length is in cell A1, width is in cell B1 and height is in cell C1
=if(max(A1:C1)=A1;1;0)
and the same for median
=if(median(A1:C1)=B1;1;0)
and for min
=if(min(A1:C1)=C1;1;0)
Hey Jason
No not like that. Can I mabe use Maxstring? I need to compare length, width and height to ensure that length has the higest value and that the height has the smallest value
Hi,
RangeMax function will help you to do this.
Your expression should be some thing like below.
IF(RangeMax(Length,Hieght,Width) = Length,1,0)
Check the attached application.
Hope this helps you.
-Sridhar
Look at RangeMax() then.
Hi Sridhar
Thank you a lot. But what can I do with Median then? Need to do the same, but no functionname called RangeMedian. Do you know the answer here also?
Hi,
I have tweaked the table a bit to achieve your requirement. I have loaded the Length, height, Width as Measure in one column.
Now we can use Max and Median to solve you scenario.
I have a look at the attached application.
-Sridhar
Thanks for the help
The Median I solve by this formula
=if(DCU.Length=RangeMax(DCU.Length,DCU.Width,DCU.Height)and(DCU.Height=RangeMin(DCU.Length,DCU.Width,DCU.Height)),1,0)