Link to home
Start Free TrialLog in
Avatar of new_crystal
new_crystalFlag for United States of America

asked on

display a symbol next to the maxm value on x-axis

i have data in following manner:
Measure     Value
Yes             1
No              45
N/A            56

the Measure names are static but Values are dynamic depending on some different field.
I want to display above data in a bar graph. and for Max(Value) , i want to place a triangle next to the name of the measure.i.e in this eg.,i have Yes,No, N/A on x-axis and all the values on y-axis, so i want to place a triangle next to N/A as its the maxm value of all the values. Again, these values are not static, i might get max value for Yes in some different scenario. so i want to display that triangle dynamically.
i have placed a triangle next to all the measures on x-axis. and i am conditionally suppressing that measure, i am using following formula,

Maximum:
if Maximum ({Command.Value}) = {Command.Value}  then
{Command.Measure}

but i am not getting expected results because what its doing is, it is giving 3 values, first 2 values blank for Yes and No and third value as Non Applicable.
If i place this formula in RH, it is giving me blank hence my triangle is not being displayed/suppressed, but if i place this formula in details then for first 2 details it is giving 2 blanks and last one it is displaying Non Applicable.
what do i need to do in order to get this problem solved?

thanks in advance,
new_crystal
Avatar of James0628
James0628

I take it that {Command.Value} is just a field in your records and not some kind of total?

 Where are you putting that formula?  Are you actually using it in the "suppress" formula in the field format for the triangle, or somewhere else?  That kind of suppression formula has to return a true or false value, and your formula does not do that (unless {Command.Measure} is a boolean field).  It sounds like you may be using that formula to output the {Command.Measure} field.

 Try the following in the "suppress" formula in the field format for the triangle field:

{Command.Value} <> Maximum ({Command.Value})


 James
Avatar of new_crystal

ASKER

yes, i am using the formula in the suppress of the format field of triangle.
I tried with your formula but it is suppressing all the traingles.
coz these traingles are in RH.
I am attaching a pdf file of the report for the reference, in this example, all the triangles are displayed but i want triangle to be displayed only next to 'No' as the value for it is the highest, all other triangles should be suppressed
testingbargraph.pdf
You have a chart in the report header?

 Are these triangles somehow part of the chart, or separate fields in the report header?

 If they're separate fields in the report header, I don't think your current formula is going to work, for a couple of reasons:

 1) Generally speaking, CR has not read the records yet when it produces the report header.  Obviously it would read them to produce the chart, but I don't think that will help as far as other fields in the report header go.  So, I don't think {Command.Value} would have any value yet, and CR certainly wouldn't have a maximum for it.

 2) You're trying to compare the current value ({Command.Value}) to the maximum.  That will only work somewhere in the body of the report (eg. detail or group header or footer section), where different records are being read.  In the report header, _if_ {Command.Value} had a value (and I don't think it would), it would only be the value from the first record.  IOW, {Command.Value} would be the same for each field, so they would all be suppressed or not suppressed.

 If these are separate fields and not a part of your chart, then about the only thing I can think of would be to have something save each value in a variable before you get to that point and then compare those saved values to the maximum.

 If you could move the chart, or these fields, to the report footer, then the values could be saved in the body of the report.

 If these fields have to stay in the report header, then a subreport in a report header section before that one could read the data and save the values (including the maximum) in shared variables.

 James
ASKER CERTIFIED SOLUTION
Avatar of new_crystal
new_crystal
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm.  Sounds too simple , but sometimes it's just a matter of approaching the problem from the right angle.  Glad you found a solution and thanks for posting what it was.

 James
Or having the report and the data to try various ideas including off the wall ones.

mlmcc
Well, yeah, that helps too.  :-)

 James