Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

show counts for all campaigns one by one in qliksense

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

Tags (1)
8 Replies
MVP
MVP

Re: show counts for all campaigns one by one in qliksense

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.

berryandcherry6
Contributor II

Re: show counts for all campaigns one by one in qliksense

Hi Petter,

Thanks.

I want to sort campaign_ids Descending order. How could i do this?

MVP
MVP

Re: show counts for all campaigns one by one in qliksense

You go to the properties that has to do with Sorting and specify that campaign_ids should be sorted first and in descending order.

berryandcherry6
Contributor II

Re: show counts for all campaigns one by one in qliksense

I have to sort(or rank) using script itself. Because these sorted data i feed to NPrinting.

MVP
MVP

Re: show counts for all campaigns one by one in qliksense

You can use ORDER BY in the LOAD statements.

sasiparupudi1
Honored Contributor III

Re: show counts for all campaigns one by one in qliksense

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

;

berryandcherry6
Contributor II

Re: show counts for all campaigns one by one in qliksense

HI Petter,

i tried both Autonumber(campaignID) and order by campaignID DESC.


Not working, all shows in Asending order. I want latest first. I need to know how to use Dual(), i am unable to implement using dual().

humesh_sindpure
New Contributor II

Re: show counts for all campaigns one by one in qliksense

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();

                 },

       

       };

} );

Community Browser