5 Replies Latest reply: Apr 5, 2016 7:00 AM by Andrey Khoronenko RSS

    Qlik sense 2.2 - stacked bar

      I am creating a stacked bar where I want percentages to the total.  I have written the expresson

       

      Count([Ship Status base on HO Dt])/count([Total[Ship Status base on HO Dt]])

       

      I am getting the error  "Error in expression ")" or "," expected.

       

      How do I proceed?

       

      Regards

      K NS

        • Re: Qlik sense 2.2 - stacked bar
          Andrey Khoronenko

          Superfluous square brackets.

          It must be so

          Count([Ship Status base on HO Dt])/count(Total[Ship Status base on HO Dt])


          Regards


          A. Kh.

            • Re: Qlik sense 2.2 - stacked bar

              Thanks Andrey.  I was able to do it.

               

              I have the dimension month also.  How do I add it, if I need to see it month wise?

                • Re: Qlik sense 2.2 - stacked bar
                  Andrey Khoronenko

                  You have already formed when loading the master calendar, the "Month" which can be inserted into the dimension chart?

                    • Re: Qlik sense 2.2 - stacked bar

                      In the data that is uploaded, it contains the date that I would like to use.  I would like to see month wise the stacked bar.

                       

                      Regards

                        • Re: Qlik sense 2.2 - stacked bar
                          Andrey Khoronenko

                          //It is necessary to create a Master calendar item. This is the option to generate.

                           

                           

                          //At first, we form a table with dates from 01.01.2014, for example, today. If necessary, the values can be changed.

                           

                          Dates:

                          LOAD

                          Date (Date ('01 .01.2014 ') + RecNo () - 1) as Period

                          autogenerate (Date (Today ()) - Date ('01 .01.2014 ') + 1);

                           

                           

                          //Now form a Master Calendar

                           

                          MasterCalendar:

                          LOAD

                                Date (Left ([Period], 10)) as Date,

                                Month (MakeDate (Year (Left ([Period], 10)), Month (Left ([Period], 10)), 1)) as CalendarMonth,

                                MonthName (MakeDate (Year (Left ([Period], 10)), Month (Left ([Period], 10)) 1)) as CalendarMonthYear,

                          Resident Dates;

                           

                          //Delete the table "Dates" is no longer necessary

                           

                          DROP Table Dates;

                           

                          //Continue compound of the left loaded your table containing a field "Date".

                           

                          Left Keep(MasterCalendar)

                          LOAD

                          ....

                           

                          //After loading the table Master Calendar will connect on the field "Date" with your table. The dimension chart is necessary to insert the "CalendarMonth" or "CalendarMonthYear" depending on the task.

                           

                          Regards