8 Replies Latest reply: Apr 4, 2018 2:12 AM by Humeshkumar Sindpure RSS

    show counts for all campaigns one by one in qliksense

    Supriya R

      Hi,

       

      My requirement is to show counts for all active campaigns one by one for batchID 23 and 24. How could i display in qliksense?

       

      Table:

      Load * inline

      [

      campaignID,batchID

      1,23

      2,24

      3,23

      ];


      TableCount:

      Load * inline

      [

      campaignID,sent,userID

      1,1,456

      2,1,32

      3,1,43

      1,1,44

      1,0,65

      2,0,55

      2,0,434

      ];



      I want to display like below

      batchID,campaignID,sentCount

      23,1,2

      23,3,1

      24,2,1



      Here campaigns can increase dynamically everyday. So while displaying it has to show sentCount for newly added campaign also autometically for each batch.



      IS this possible in qliksense? If so how could i show like above

        • Re: show counts for all campaigns one by one in qliksense
          Petter Skjolden

          You simply create at table in a sheet where you have:

           

          - Add two dimensions: batchID and campaignID

          - Add a measure: Sum(sent)

           

          And of course you will have to reload the application each day to get it updated with the new figures.

          • Re: show counts for all campaigns one by one in qliksense
            Sasidhar Parupudi

            Table:

             

             

            Load * inline

             

             

            [

             

             

            campaignID,batchID

             

             

            1,23

             

             

            2,24

             

             

            3,23

             

             

            ];

             

             

             

             

             

             

            Left Join(Table)

             

             

            Load * inline

             

             

            [

             

             

            campaignID,sent,userID

             

             

            1,1,456

             

             

            2,1,32

             

             

            3,1,43

             

             

            1,1,44

             

             

            1,0,65

             

             

            2,0,55

             

             

            2,0,434

             

             

            ]

            where sent>0;

             

             

            Left Join(Table)

            Load

            batchID,

            campaignID,

            Count(sent) As sentCount

            Resident Table

            Group By

            batchID,

            campaignID

            ;

            • Re: show counts for all campaigns one by one in qliksense
              Humeshkumar Sindpure

              Hello,

               

               

              I want to give custome color property for background color to perticular dimention .

              but I dont know how to given it .can you guys please help me to solve this problem ?

              here is my javascript  code for 

               

              define( ["qlik","jquery", "text!./style.css", "text!./template.html"], function (qlik, $, cssContent, template ) {'use strict';

                  $("<style>").html(cssContent).appendTo("head");

                return {

                     template: template,

                        initialProperties : {

                            qHyperCubeDef : {

                                 qDimensions : [],

                                 qMeasures : [],

                                 qInitialDataFetch : [{

                                                          qWidth : 10,

                                                          qHeight : 50

                                                         }]

                                   }

                            },

                     definition : {

                                type : "items",

                                component : "accordion",

                                items : {

                                       dimensions : {

                                                           uses : "dimensions",

                                                             min : 1,

                                                           items:{

                                                                  colorExpression:{ 

                                                                                            type: "string",

                                                                                           label: "Enter color expression",

                                                                                           component: 'expression',

                                                     ref:"qHyperCubeDef.qDimensionsInfo.0.qAttributeExpressions.0.qExpression",

                                                                                  expression: "optional"

                                                       

                                                                                    }

                                                                  }

                                                            },

               

                                        measures : {

                                                       uses : "measures",

                                                     min : 0

                                                          },

                                           sorting : {

                                                       uses : "sorting"

                                                       },

                                          settings : {

                                                        uses : "settings",

                                                        items : {

                                                                 initFetchRows : {

                                                                                    ref : "qHyperCubeDef.qInitialDataFetch.0.qHeight",

                                                                                    label : "Initial fetch rows",

                                                                                     type : "number",

                                                                                  defaultValue : 50

                                                                                   }

                                                                     }

                                                           }

                                          }

                },

                support : {

                              snapshot: true,

                               export: true,

                            exportData : true

                               },

                paint: function ( ) {

                //setup scope.table

                                    if ( !this.$scope.table ) {

                                     this.$scope.table = qlik.table( this );

                                      }

                                       return qlik.Promise.resolve();

                               },

                     

                     };

               

               

              } );