Skip to main content

Measures and Levels

Measures and Levels

In this section, we take a closer look at measures and levels.

  1. Click New.

  2. Drag and drop Patient Count and Avg Age, to the Measures area.

    You now see something like this:

    generated description: view measures

    This simple pivot table shows us the aggregate value for each of these measures, across all the records in the base class. There are 10000 patients and their average age (in this example) is 35.93 years.

  3. Compare these values to the values obtained directly from the source table. To do so:

    1. In a separate browser tab or window, access the Management Portal and go to the namespace into which you installed the samples, as described earlier.

    2. Navigate to Home > System Explorer > SQL.

    3. Click the Execute Query tab.

    4. Execute the following query:

      select count(*) as "count",avg(age) as avgage from bi_study.patient

    You should see the same numbers. For example:

    generated description: view measures sql

    Tip:

    Leave this browser tab or window open for later use.

  4. In the Analyzer, modify the previous pivot table as follows:

    1. Expand GenD on the left.

    2. Drag and drop Gender to the Row area. Now you see something like the following:

      generated description: view measures redefined

  5. Compare these values to the aggregate values obtained from the source table. To do so:

    1. Access the Management Portal and go to the namespace into which you installed the samples, as described earlier.

    2. Navigate to Home > System Explorer > SQL.

    3. Click the Execute Query tab.

    4. Click Show History.

    5. Click the query you ran previously.

    6. Add the following to the end of the query and then rerun the query:

       group by gender
      

      You should see the same numbers as shown in the pivot table. For example:

      generated description: view measures redefined sql

  6. For a final example, make the following change in the Analyzer:

    1. Click the X button in the Rows pane. This action clears the row definition.

    2. Expand ProfD and Profession.

    3. Drag and drop Electrician to Rows.

    The system displays something like this:

    generated description: electrician

  7. Compare these values to the values from the source table. To do so:

    1. Access the Management Portal and go to the namespace into which you installed the samples, as described earlier.

    2. Navigate to Home > System Explorer > SQL.

    3. Click the Execute Query tab.

    4. Execute the following query:

      select count(*) as "count",avg(age) as avgage from bi_study.patient join bi_study.patientdetails 
      on bi_study.patient.patientid = bi_study.patientdetails.patientid 
      where bi_study.patientdetails.profession->profession='Electrician'

    You should see the same numbers. For example:

    generated description: electrician sql

FeedbackOpens in a new tab