Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  Cognos Dashboards Stripping Leading Zeros

    Posted Mon February 04, 2019 12:14 PM
    Hi!
    I've been having a problem with zip codes showing up correctly on a dashboard map. After some investigation, this appears to be because Cognos is removing leading zeros from the zip code, resulting in odd behavior. For example, 01607 is a zip code in Worcester, MA. However, because Cognos is stripping the leading 0, the map highlights 1607, which is a city in Kazakhstan. 

    Here is my .csv data:
    Last column (Zip-Trimmed) has leading zero
    Here is the same data when imported into Cognos:
    Zip_Trimmed no longer has leading zeros
    As you can see, in the first screenshot Notepad++ shows the leading zeros for the final column, "Zip_trimmed". When the data is imported into Cognos, you see that there are no longer leading zeros. Additionally, if you look closely on the map you can see that there is nothing highlighted in Massachusetts and instead, 1607 is highlighted in Kazakhstan. 

    Question: How do I prevent Cognos from removing leading zeros?

    Thank you for your help

    ------------------------------
    Austin Milner
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Cognos Dashboards Stripping Leading Zeros

    Posted Mon February 04, 2019 12:33 PM
    Thanks for investigating and posting your question. I've had this same issue and didn't spend time looking into it. I look forward to seeing a response.

    ------------------------------
    Kindest regards,
    Cindy Berry
    UX Designer
    WH Payer Provider
    ------------------------------



  • 3.  RE: Cognos Dashboards Stripping Leading Zeros

    Posted Mon February 04, 2019 05:25 PM
    Austin/Cindy,

    I am able to reproduce the problem you are seeing. I will get back to you tomorrow.

    ------------------------------
    KIAN GOH
    ------------------------------



  • 4.  RE: Cognos Dashboards Stripping Leading Zeros

    Posted Tue February 05, 2019 04:40 PM
      |   view attached

    @Austin Milner @Cindy Berry

    I logged a defect ​​ for this problem. 

    If you are using CA 11.1.1, I have a workaround for you. In the attached Excel file, I explicitly use '01697 (with apostrophe mark in front of 01697), then the leading zero in the Zip Code column  is "preserved" as text format.  In this case, '01697' is showing up in Dashboard, map is rendering as expected using "01697" Zip Code. 

    If you are to log a support call, mention defect 266455.



    ------------------------------
    KIAN GOH
    ------------------------------

    Attachment(s)



  • 5.  RE: Cognos Dashboards Stripping Leading Zeros

    Posted Tue February 05, 2019 04:45 PM
    Thanks Kian. I'm using 11.0.12. I don't suppose the workaround works for that version? Anyway, good to know this will be fixed soon, my client will be happy to hear that

    ------------------------------
    Austin Milner
    ------------------------------



  • 6.  RE: Cognos Dashboards Stripping Leading Zeros

    Posted Wed February 06, 2019 12:32 PM
    @Austin Milner

    @Rob Hatfield shared a workaround:  The current data import UI does not have a way to specify the data type.  Since the column is all numeric, it is interpreted as a number, stripping the 0.  Excel will do the exact same thing unless you specify the column is text on import.  The easy work-around is to use xlsx and to specify the cell data type is text. 

    I tried the workaround in 11.0.12, and it works for me. Attached the sample Excel file here. Hope that helps.

    Cheers.​​

    ------------------------------
    KIAN GOH
    ------------------------------