Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Measures in schema workbench

  1. #1
    Join Date
    Feb 2011
    Posts
    240

    Default Measures in schema workbench

    Hi,

    I'm using the tool schema workbench:

    I've tha fact table KXDF_PREANN and the measure N.PRESTAZIONI;
    I've the dimensione table KXDF_ACCANN and I want calculete the measure N.ACCESSI, but how do I do?

    Thanks
    Mariarita

  2. #2
    Bill Back Guest

    Default

    If I understand your question, you are trying to create a calculated measure using Schema Workbench.
    In the schema, click on the cube, then click on the CM+ button in the toolbar to add a New Calculated Measure. Enter a name and formula based on other values. See http://mondrian.pentaho.com/document...ulated_members for more details.

  3. #3
    Join Date
    Feb 2011
    Posts
    240

    Default

    No,
    I've into the fact table KXDF_PREANN the field "prestazioni" and the I insert into the cube the measure N.Prestazioni = sum (prestazioni), and this is ok.
    Then I've a dimension table KXDF_ACCANN with the field "accessi" and I want insert the measure N.accessi=sum (accessi), this is the problem.

    Thanks
    Mariarita

  4. #4
    Join Date
    Feb 2011
    Posts
    240

    Default

    Is there a solution?

    thanks
    Mariarita

  5. #5
    Join Date
    Nov 2009
    Posts
    687

    Default

    I don't think that you can define a measure from a dimension table.
    A posibility how you can manage it is to us a view with a join between your fact table and your dimension table with in it this view the fields you need and use this view as your facttable.

  6. #6
    Join Date
    Dec 2011
    Posts
    7

    Default

    It seems an analysis error.
    Remember a fact table must answer the question "what" and in the dimension tables you must set the "for's" for example I want to know the quantity of sales FOR the items in the category 'drinks' FOR the year 2011 then I need a product dimension, a time dimension and in the fact table a quantity field

  7. #7
    Join Date
    Feb 2011
    Posts
    240

    Default

    The problem is:

    I create a Report with Report Designer of Pentaho and the result is the img1, this result is correct.

    Then I create a similar schema with the tool schema workbench and the result is the img2, this result there is not correct.

    But I've a fact table (KXDF_PREANN) and a dimension table (KXDF_ACCANN), two measures sum(NUMERO) and sum(PRESTAZIONI_QTA), four dimensions: ANNO, TIPO ACCESSO, TIPO OPERATORE, QUALIFICA OPERATORE.

    I dont kwon because the results are different
    Name:  img1.jpg
Views: 441
Size:  12.0 KB
    Name:  img2.jpg
Views: 439
Size:  14.1 KB

  8. #8
    Join Date
    Dec 2011
    Posts
    7

    Default

    Have you tried to use a property? In your cube schema in the dimension of the table KXDF_ACCANN you can add a property and in there you define the table column, this way you can acces that value as a calculated member with the formula [Mydimension].CurrentMember.Properties("MyProperty")

  9. #9
    Join Date
    Feb 2011
    Posts
    240

    Default

    Then I must create a cube with fact table = KXDF_PREANN and measure = sum (PRESTAZIONI_QTA) where PRESTAZIONI_QTA is a field of KXDF_PREANN table, the dimension table is KXDF_ACCANN and the dimension are ANNO, TIPO OPERATORE, QUALIFICA OPERATORE and TIPO ACCESSO that are fields of KXDF_ACCANN table. To calculate sum (NUMERO), where NUMERO is a field of KXDF_ACCANN table, should I use the calculeted member? and what's the formula?

    Thanks
    Mariarita

  10. #10
    Join Date
    Dec 2011
    Posts
    7

    Default

    It would be easier if you attach your xml schema file created on schema workbench

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.