Max function in Report

B

bhm7319

I used max function in my report to find the maximum value in that column.
But I have another column which gives the description of the of those value.
I would like to know that also when I get the maximum value. So when I see
maximum value, I also know the name of the object which has the maximum value.

Thanks in advance.
 
K

KARL DEWEY

Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
 
B

bhm7319

Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.
 
K

KARL DEWEY

A couple of things -
I do not see Max in your query.
You do not have DESC in the select statement.
LFR.kV) Not Like 500 is improper - use LFR.kV) <> 500 instead.

Post the SQL where you have DESC and Max in the query.

--
Build a little, test a little.


bhm7319 said:
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.

--
Bharat


KARL DEWEY said:
Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
 
B

bhm7319

Karl:

I put that query in the report. It reads like "=Min([VoltMag1])". That way I
know what is minimum voltage in my report. I want connect that value with the
"FromId".

Thanks for your help!
--
Bharat


KARL DEWEY said:
A couple of things -
I do not see Max in your query.
You do not have DESC in the select statement.
LFR.kV) Not Like 500 is improper - use LFR.kV) <> 500 instead.

Post the SQL where you have DESC and Max in the query.

--
Build a little, test a little.


bhm7319 said:
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.

--
Bharat


KARL DEWEY said:
Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
--
Build a little, test a little.


:

I used max function in my report to find the maximum value in that column.
But I have another column which gives the description of the of those value.
I would like to know that also when I get the maximum value. So when I see
maximum value, I also know the name of the object which has the maximum value.

Thanks in advance.
 
K

KARL DEWEY

I put that query in the report. It reads like "=Min([VoltMag1])".
I asked you to post your query SQL.

--
Build a little, test a little.


bhm7319 said:
Karl:

I put that query in the report. It reads like "=Min([VoltMag1])". That way I
know what is minimum voltage in my report. I want connect that value with the
"FromId".

Thanks for your help!
--
Bharat


KARL DEWEY said:
A couple of things -
I do not see Max in your query.
You do not have DESC in the select statement.
LFR.kV) Not Like 500 is improper - use LFR.kV) <> 500 instead.

Post the SQL where you have DESC and Max in the query.

--
Build a little, test a little.


bhm7319 said:
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.

--
Bharat


:

Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
--
Build a little, test a little.


:

I used max function in my report to find the maximum value in that column.
But I have another column which gives the description of the of those value.
I would like to know that also when I get the maximum value. So when I see
maximum value, I also know the name of the object which has the maximum value.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top