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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Metric Within a Metric ?? (Not compound metric)

Status
Not open for further replies.

zxzzzzzz

Programmer
Jul 10, 2002
51
US
Is it possible to have a metric which is say a SUM of (data_element1) and add something like a "where" clause that is another metric

EXAMPLE: Sum(product_units)
where max(week_end_date)= 'xx/xx/xx' (user input)

???

Thanks!!
 
another good one GB65. You need to use a filtered metric.

- create a report and put weekenddate, and metric (max(weekenddate)) on it. For the filter, put a weekenddate filter and let users choose. when you execute this report you should get the single weekenddate you are looking for.
- create a filter F1 and drag R1 onto the filter.
- In your metric definition window look for the word "condition". click on it and browse to F1 created above.

What's nice here is that if you change the definition of R1, your metric will pick up the change automatically...
 
One question.... On the Last - (in your metric definition....),, is this a new metric or the metric(max(weekenddate)) ?? I did create the R1 and F1 per above.

Sorry to be slow, but this is completely new to me... Training isn't until mid-August, but my users want this report last month!!

Thanks!
 
Addendum: My dilemma is that I have to show both endofweek AND beginningofweek on the same report if possible. Since we don't have a true table field called beginning of week, we have to use end of week - 7. If the user inputs a date range of 6/7/03 through 6/28/03,,, I need to be able to take the MIN of the input which is 6/7/03 then subtract 7 from it to come up with my true begining of week units. The I take the MAX of the input which is 6/28/03 and show true end of week units. I don't know if this can even be done in one report.

Thanks!!
 
you should use non-aggregatable metrics for endingweek and beginningweek metrics.

See page 129 of the "Advanced Reporting Guide" documentation.
 
last stupid question.... My week_ending_date is an attribute--not a metric.???
 
you won't need to make it an attribute, just use regular date. It should be fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top