8 Replies Latest reply: Jul 24, 2017 5:51 AM by Jose Miguel Vilaplana RSS

    Qlik Duplicating Values

    Alison Cooke

      Hello Everyone,

       

      Some field values are duplicating when they are added into Qlik.

       

      For example,

       

      I have raw data that looks like so:   

      Item

      Q1 Budget

      Study Room Program Manager6000
      Study Room Assistant1800
      Rent0
      Utilities1200
      Generator Expenses300
      Phonebills & Internet Expenses125
      Professional Fees - Lawyer & Auditor1250
      Stationary128
      Public School Supervisors0
      Printing12000
      Revision & Consulting0
      Marketing & Advertising0
      Web Fees (Social Media)1000
      Study Room Furniture (Two Class rooms & accessories)0
      Equipment (Required for bigger premises)

      0

       

       

      But for some reason, when uploaded to Qlik, the values are duplicated.

      Screenshot (55).png

       

      Why is that? I know I can solve the issue using distinct i.e. Sum(distinct [Quarter One Budget]). But I am curious as to why this is happening. Please can someone explain this to me.

       

      Thank you in advance,

      Alison

        • Re: Qlik Duplicating Values
          Michalina McAllister

          Hi Alison,

           

          From you posted above looks like your Category table is not associated with Data table, so displaying Q1 Budget by Item will most probably cause some duplication. Rather than resolving this by using sum( distinct MeasureName) in the chart itself this should be resolve in your script by re-designing your data model.

           

          How is your data connected?

           

          If you could post a sample app that would be really helpful.

           

          Micha

            • Re: Qlik Duplicating Values
              Alison Cooke

              Hello all,

               

              Thank you for your responses, here is the load script:

               

              [Project Budget]:

               

               

              CROSSTABLE ([Project Budget.Attribute field],[Project Budget.Data field],4)

              LOAD [Item],

              [Y1 Budget],

              [Q1 Budget],

              [Q2 Budget],

              [42644],

              [42675],

              [42705],

              [42736],

              [42767],

              [42795]

              FROM [lib://Finance Apps/MMKN.xlsx]

              (ooxml, embedded labels, table is [Project Budget]);

               

               

              [Date]:

              LOAD

                [Project Budget.Data field] as [Project Budget Amount],

                [Item] as [Project Budget Item],

                [Y1 Budget] as [Year One Project Budget],

                [Q1 Budget] as [Quarter One Budget],

                [Q2 Budget] as [Quarter Two Budget],

                Date#([Project Budget.Attribute field]) as Date

               

              Resident [Project Budget];

              Drop table [Project Budget];

               

               

              [Category]:

              LOAD * INLINE [

              Item, Category

               

               

              Public School Supervisor, Activities

              Priniting, Activities

              Revision & Consulting, Activities

              Marketing & Advertising. Activities

              Web Fees (Social Media), Activities

              Study Room Furniture (Two Class rooms & accessories), Capital Costs

              Equipment(Required for bigger premises), Capital Costs

              Study Room Program Manager, Salaries

              Study Room Assistance, Salaries

              Rent, Overhead Costs

              Utilities, Overhead Costs

              Generator Expenses, Overhead Costs

              Phonebills & Internet Expenses, Overhead Costs

              Professional Fees - Lawyer & Auditor, Overhead Costs

              Stationary, Overhead Costs

               

               

              ];

            • Re: Qlik Duplicating Values
              Jose Miguel Vilaplana

              Hi

               

              Could you share your code? Is difficult to understand what's happening without see it.

               

              Regards

              • Re: Qlik Duplicating Values
                pankaj thakur

                Please post your load script.

                • Re: Qlik Duplicating Values
                  Arvind Patil

                  Hi Alison,

                   

                  May be In your Master table have duplicate values and you applied master on transaction data . That may be cause.

                   

                  Thanks,

                  Arvind Patil