Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Rows on Report not Matching DB

    Posted 02/25/21 10:58 AM

    I have rows in a report that do not match the totals from the database. I am attempting to show:

    "Part Number", "Total Inventory On-hand", and "Inventory Usage for the last 12 months".

     
    I think the issue is the "Inventory Table On-Hand Table" has the same part numbers occurring multiple times due to parts being in several inventory locations.


    In the model, I am connecting it through the "Inventory Table On-Hand Table" for a Many to One to the "Part Number Table"  This relationship is by Part Number.

    I am then connecting the "Inventory Usage for the last 12 months Usage Table" to the "Part Number Table". Part Number Table is One to the "Inventory Usage Table" is Many. This relationship is also by Part Number.


    The row sums are much higher to spot on depending on the number of times the part number occurs on the "Inventory on-hand Table".

    Please Help.

     

     



    ------------------------------
    Andy Wilson
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Rows on Report not Matching DB

    Posted 02/25/21 02:34 PM

    Hi Andy,
    Would you be able share a pictorial of the tables + relationships that you're modeling?

    Are you using a Data Module or an Framework Manager model ?

    // Henk



    ------------------------------
    HENK CAZEMIER
    ------------------------------



  • 3.  RE: Rows on Report not Matching DB

    Posted 03/04/21 01:56 PM
    Sorry for the late response Henk. Thank you,.

    Relationships are;
    • Part Master to Trans History = Part Number, (Inner Join, 1 to many, No Filtering)
    • Part Master to Inventory Balance = Part Number, (Right outer join, 1 to many, No Filtering)
    • Part Master to Product line = Product line #, (To pull descriptions only, no calculations), (Inner Join, 1 to many, No Filtering)
    • Part Cost to Inventory Balance = Part Number, (Inner Join, 1 to many, No Filtering)
    • Location Master = Inventory Balance = Location, (To pull descriptions only, no calculations), (Inner Join, 1 to many, No Filtering)

    This is a data module.  The Inventory Balance table has multiple occurrences of the part due to the part being in several locations.


    The items below usage is actually 1,844,700



    ------------------------------
    Andy Wilson
    ------------------------------



  • 4.  RE: Rows on Report not Matching DB

    Posted 03/04/21 01:59 PM
    Correction
    • Location Master = Inventory Balance = Location, (To pull descriptions only, no calculations), (right outer Join, 1 to many, No Filtering)


    ------------------------------
    Andy Wilson
    ------------------------------



  • 5.  RE: Rows on Report not Matching DB

    Posted 03/10/21 06:42 PM

    Hi Andy

    This is an annotation of your diagram, identifying the roles of your tables as interpreted by the query engine.

    how the query engine sees your diagram



    As you can see you have 3 dimensions and 2 fact tables. The dimensions are Part cost, Inv Locations, and product line/Part master.

    The facts are Inventory bal and and trans history.

    I think this is a problem as I believe that you want trans history in the product line/Part master dimension.


    It is not clear where your 4 columns come from but I suspect that some are coming from trans history and I think that is causing havoc.


    If you want to include the transaction history in your product line/Part master dimension then you will need to model that dimension so that the relationship between it and the inventory balance fact table goes through the necessary keys of the transaction history table.

    Normally during the process of designing your data warehouse and ETL, this sort of situation will be identified and a mapping between the transactional schema data base and a data warehouse schema, which is better suited for report query purposes, would be done.

    You could try to model this with the existing data base structure.  This might require some modelling of additional columns in the query subjects to generate the required keys in both tables.  I don't know if there exists information which could be used to do that modelling.

    For example, I am able to fairly easily model time windows in relationships between a dimension table and a fact table in the Cognos great outdoors warehouse sample data base because the keys for time are in the structure yyyymmdd and can be substringed, concatenated with the necessary '-' symbols and that string  then cast into a date, which can be the key to a join to the dimension table, where a date (employee record start date or employee record end date for example) would exist.   I can use the same method to create a date column in a fact table, which I can use as the lookup reference to a calendar so that I can set up relative time measures.  The data which defines date keys in your facts might not be so easy to deal with.

    symbolic representation of what you need to have to have modelled this



    ------------------------------
    IAN HENDERSON
    ------------------------------