Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

disply metrice based on a join

disply metrice based on a join

disply metrice based on a join


We have a table called order with various columns like oid,vid,odata,etc. The other table is called prod which has columns like oid,product_type etc.

oid is the pk/fk between hes tables. I want to get a count(oid) from order table grouped by product-type.

I created an attribute with oid and prod_type code. oid was used for joining and prod-type code is the only form on display.

Somehow MSTR creates a sql grouping by the oid also. May be is is used as ID in joining these tables? please help me. I am new to MSTR. Also where can I get some doc about vmall?


RE: disply metrice based on a join

The Engine use the ID field as the keys to do the join.
In your case I imagine you need to do a SQL like this:
select p.prod_type, count(o.oid)
from prod p, order o
where p.oid=o.oid
group by p.prod_type

What you need to do is:
create an attribute prod_type use prod_type as id;
create an attribute oid use oid as id automatic;
create a fact on the order table (any num column) and call it something (e.g. fact1)
Update schema;
create a metric count(oid) parameter at that fact level (fact1).
create a report with prod type and the metric. That's it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close