Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count between two attribute values

Status
Not open for further replies.

mstrdev

Programmer
Sep 11, 2003
3
US
I want to build a report to count between the values of two attributes. For example, I already have

ID(Attr) TransDate(Attr) TransDateOneYearEarlier(Attr)
12345 01/01/2000 07/01/1999
12346 02/12/2000 08/12/1999
on the template. I would like to add a new metric to count on attribute TransDate between "07/01/1999" and "01/01/2000" for the first row, "08/12/1999" and "02/12/2000" for the second row, etc. Have any idea how to build the metric?

Thanks
 
Oops, sorry, I meant to count on the ID between those attribute values for each row. The correct version is now -

I want to build a report to count between the values of two attributes. For example, I already have

ID(Attr) TransDate(Attr) TransDateOneYearEarlier(Attr)
12345 01/01/2000 07/01/1999
12346 02/12/2000 08/12/1999
on the template. I would like to add a new metric to count on ID between "07/01/1999" and "01/01/2000" for the first row, "08/12/1999" and "02/12/2000" for the second row, etc. Have any idea how to build the metric?

Thanks
 
i think it's possible but first you need to specify what the attribute is for the filter. In your example you wrote...

count on ID between "07/01/1999" and "01/01/2000"

should the filter be TRANSDATE(Attr) between "0701999" and "01012000"?

Or is it another DATE attribute between "0701999" and 01012000?
 
Yes, I mean to filter ID on TRANSDATE(Attr) between "07011999" and "01012000". Any thought?
 
Very difficult to answer your question without been able to see the datamodel. Did you come up with the SQL that you would run to get that answer? This would help us (me?) understand how your model works.
FLB.
 
i did more tinkering...this is going to be hard unless you create 2 transformation attributes. The problem is that when you place the A1 and A2 on the report, the sql assumes that you are looking for data at the intersection of A1 and A2, not the difference.

the short answer is it will be too difficult until the ability to edit SQL comes out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top