20 Replies Latest reply: Mar 15, 2018 6:36 AM by Ruben Marin RSS

    Table Creation Help

    Ric Morgan

      Hi All,

       

      I'm trying to create a table in Qlik Sense to show the number of patients each month and how their appointment was booked as below:

       

      SourceFeb 2018March 2018
      Phone
      Email
      Web Form

       

      I created the Month columns as measures. Below is the formula for Feb 2018 which counts the total number of appointments and filters those that were booked in Feb.

       

      Count(

      {<[Submission date.autoCalendar.YearMonth]={"2018-Feb"}>}

      [Submission date])

       

      How do I also filter it by each source?

       

      Thanks,

        • Re: Table Creation Help
          Ruben Marin

          Hi Rick, if you add Source as dimension, each row will count the associated source values. Is not working like that?

          • Re: Table Creation Help
            Shraddha Gajare

            You can try with Pivot table.

             

            Row - Source

            Column - [Submission date.autoCalendar.YearMonth]

            Measure - count ([Submission Date])

            • Re: Table Creation Help
              Ric Morgan

              Thanks for the help here guys, I think that is the issue, the data source with the sources column isn't linked to the other sources for bookings/appointments. I'll have a go at getting this sorted and retest and see if it works.

               

              Thanks again for your help on this.

                • Re: Table Creation Help
                  Ric Morgan

                  Just a quick one in relation to this. How do I create a column and only display certain values? (without applying a filter)

                   

                  I.e. If I want to only show fields where the course is Email?

                   

                  So when I'm creating a row, in the field I'm putting Source = "email"

                    • Re: Table Creation Help
                      Ruben Marin

                      Usually best performace is filtering using set analysis in expression:

                      Count(

                      {<[Submission date.autoCalendar.YearMonth]={"2018-Feb"}, Source={'email'}>}

                      [Submission date])

                        • Re: Table Creation Help
                          Ric Morgan

                          Thanks again for the help on this, all looking good so far!

                           

                          One more thing I need abit of advice on:

                           

                          We have the need to store all of our KPI's in the same table so that we can export them all together rather than having to click on every individual table and export to excel.

                           

                          This is what we need:

                           

                          test1.png

                          Currently these are created separately i.e. Table 1: Source of Referal, Table 2: Patients seen within 5 working days.

                           

                          Is it possible to combine these into the same pivot table?

                           

                          Failing this; is there a way to export multiple tables on the same sheet as an excel/csv file at the same time?

                            • Re: Table Creation Help
                              Ruben Marin

                              Hi Ric, to export many tables at once I think you need a macro.

                               

                              To use in the same table maybe a quick fix can be done:

                              // Add an inline table with KPIs

                              KPI:

                              LOAD * Inline [

                              IdKPI, KPI

                              1, Source of referal

                              2, ...

                              3, ...

                              ];

                               

                              In table add dimension KPI and a calculated dimension like:

                              If(IdKPI=1, Source)

                               

                              The expression can use the idKPI to select the expression:

                              Pick(IdKPI

                              , Expression for kpi1

                              , Expression for kpi2

                              , Expression for kpi3

                              )


                              Maybe needs aggr(:

                              Aggr(Pick(

                              ...

                              ), IdKPI)

                                • Re: Table Creation Help
                                  Ric Morgan

                                  Thanks again for your quick response Ruben, is it possible to create Macro's in Qlik Sense cloud?

                                   

                                  I Assume an inline table is added within the data load editor?. Is there a step-by-step guide somewhere for creating this?

                                  • Re: Table Creation Help
                                    Ric Morgan

                                    Hi Ruben,

                                     

                                    Any further help on this would be much appreciated.

                                      • Re: Table Creation Help
                                        Ruben Marin

                                        Hi Ric, I think the macro option is not possible in Cloud.

                                         

                                        Yes, the inline should be added in script editor, I attach a simple sample with dummy expressions to get the idea.

                                         

                                        The IdKPI identifies wich expression to pick, dimensionality is used to decied when draw the value (on first or in 2nd dimension).

                                        And desabling the option toshow zero values to hide rows without data.

                                          • Re: Table Creation Help
                                            Ric Morgan

                                            Hi Ruben,

                                             

                                            Thanks a lot for this! After attempting this in my app and looking into the inline functionality. It is my understanding that this only works if you are typing the data in manually within the data loader? Our app needs to pull data from xls files. Is there another way I can get around this?