Feedback Form

Si Blog

November 2008 - Posts

  • Question Composition - Quickly Create Filters and Segmentation in a Flowchart Manner

    Some of you may have probably noticed that apart from sheets, a Prism document may also contains 'questions'.  Unlike a sheet that is used to visualize data, a question is a special type of canvas used to visually create filters and segment data.  It is also useful for observing the structure of a complex filter.

    Defining a Dimensionality or Base Filter

    The first thing to decide before beginning is which dimension you wish to filter.  Once decided, drag this dimension from the Data Browser and drop it onto the Question canvas.  A box representing all members in the dimension will appear.

    Should you drop a previously created filter on this canvas you will see the filter's entire structure directly in the Question, allowing for further filtering or modifications.

     

    Filtering a Dimension

    When hovering with the mouse over the box, four white areas will appear.  Clicking on one of them will present a list of available filter operations you can perform on the dimension.  This are the same filter types as available directly from the data browser.  For more information about filters and filter types, visit our introduction to filters page.

     

    Clicking on the requested type of filter (in our example case a Top Ranking filter) will create this filter with default values you can edit and change.  The name of the filter can be changed by double-clicking the title area.


     

    Repeating The Process

    You can repeat this process as many times as you wish, to create as many filters as you require.  In this example, we've created a Top Ranking and a Bottom Ranking filter off the Product Name dimension to segment it into two groups - top selling products and bottom selling products.  The filters themselves can be further filtered in the same manner.  In the example below, we connected both Top and Bottom filters into a Union box to create a single filter that returns both top and bottom products.


     

    Adding Filters to the Repository

    Each box in the diagram represents a list of members that answer to the given criteria.  Each box can now be added to your repository for reuse in your reports and dashboards by clicking on the save button.

     

     

     

  • Pivot-like Excel Data to Flat Excel Data for Better Analysis and Reporting (Unpivot)

    Sometimes, data in an Excel file is not structured ideally to be imported by Prism.  Occasionally, the data is presented in a Pivot-like manner that is more readable and takes up less storage space.  A good example for this is marketing survey data that often comes in this form:

    Image 1 - Marketing Survey Data Sample

     

    Each row represents the answers of a single survey respondent.  The first respondent - John, gave the answer ‘Good' to the first question, the answer ‘Best' to the second question, etc.

    A typical report created over marketing survey data such as this is shown in the following pivot image.  For each question the numbers of total respondents as well as the number who answered a particular answer.

    Image 2 - Marketing Survey Report

    If you try to import that source data as shown in Image 1, you'll encounter some difficulties creating the report in Image 2.  Since each question description comes in a different FIELD in Excel you will not be able to place them as separate rows in the pivot.  You will be able to perform interesting analysis, but not quite what we were looking for here.

    Restructuring the Excel Data

    In order to create the pivot we want, we need to the data structured in a flat manner as presented in Image 3:

    Image 3 -Flat Marketing Survey data

    This format allows you to maximize the information you can obtain out of data with Prism.  It lets you correlate between practically any member and any other.   However, manually converting our source data to this format can be quite a test on one's patience.  Luckily, you don't have to.

    The Reformatting Macro

    We've created an Excel macro (written in VB Script) that automatically converts data from a pivot-like format (Image 1) to a flat format (Image 3).  It accepts 5 parameters:

    1. Row Fields Range: The range containing the row descriptive members.  In Image 1, this would be A2:C5.
    2. Column Fields Range: The range containing the column descriptive members.   In Image 1, this would be H1:F1.
    3. The name of the sheet the original data is in.
    4. The name of the sheet to contain the restructured data.
    5. The maximum number of rows to use on a single sheet (Excel 2003 is limited to 65K rows per sheet).

    To use the macro, download the Excel file here.  Once it opens, make sure you enable macros in Excel or this won't work.  The sheet named ‘Configuration' contains a range for you to type in the parameters and a button to begin the process.  To use this macro on your data, just create a new sheet, place your data on the top left, point the macro to this data in the Configuration sheet and click ‘Reformat'.  Now create a data source out of the reformatted data and you're ready to go. Here's an example PSM file.

    Note: The flat format takes up more rows than a pivot-like format.  That is why this macro will automatically break the flat data into as many sheets as required to accommodate it.  Prism allows you to append data from different sheets so your data will be fully imported.