Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MaxString() function has an issue

Hi,

I am trying to achieve the max of the Program using Maxstring(). It works for most of the projects. but for this scenario it gives an incorrect output.

Expected Output is  B2700.18

But the output showing in the QV chart is B2700.8.

Max.PNG

Is there any way I can fix this issue.

13 Replies
Anonymous
Not applicable
Author

I am not sure, on how that works. Can you explain with an example?

kamielrajaram
Creator III
Creator III

Hi,

Would this help, by making the order value 0

if(isnull(SubField(ID,'.',2)),0,SubField(ID,'.',2))

Anonymous
Not applicable
Author

I approached it so far in this way taking all your suggestions into consideration, I am still validating for couple of scenario's though:

SubField(if(Progrm = ID,ID & '.0',ID), '.', -1) as ID_Decimal in the script to identify the decimal value

and in the chart expression,

I broke the Id into 3 pieces to resolve and identify the Max of the ID

MaxString(subfield(ID, '.', 1)) &  if(ID_Decimal=0,' ','.') & MaxString( (subfield(ID, '.', 2)))

Colin-Albert

You can use this expression on the Sort tab of the chart properties.

Select the sort expression option and enter the subfield expression.

Now you display your data but the sort order is evaluated using the sort expression.