3 Replies Latest reply: Oct 19, 2017 11:27 AM by Victor Torres Jurado RSS

    Line chart, stacked area. Empty spaces

    Victor Torres Jurado

      Hi, experts!

      I have an issue with a line chart. But before I'll put some sample data.

       

      Data:

      LOAD

           Month(makedate(year(today()),Month)) as Month

          ,Type

          ,Value

      INLINE [

      Month, Type, Value

      1 , Type A , 1345

      1 , Type C , 32

      2 , Type A , 1285

      3 , Type A , 1380

      4 , Type A , 1208

      5 , Type A , 1790

      5 , Type B , 160

      5 , Type C , 160

      6 , Type A , 2130

      6 , Type B , 32

      7 , Type A , 1786

      7 , Type B , 224

      7 , Type C , 102

      8 , Type A , 1988

      8 , Type B , 736

      8 , Type C , 44

      9 , Type A , 2404

      9 , Type B , 64

      9 , Type C , 96

      9 , Type D , 128

      10 , Type A , 994

      10 , Type B , 192

      11 , Type A , 1286

      11 , Type B , 32

      12 , Type A , 816

      12 , Type B , 384

      ];

       

      With 2 dimension (Type and Month) and a measure (sum(Value)), I get this chart (stacked area) :

      Graph_1.png

      I want to show the percentage of each type for the total values of every month.

      With this measure:

      sum(Value ) / sum(  TOTAL  <Month> Value  )

      This is the output (formatting the measure as %)

      Graph_2.png

      In May, I have these values:

      Type A: 84.83 (blue)

      Type B: 7.58% (green)

      Type C: 7.58% (yellow)

      Total: 99,99%

       

      Is there any option that there are no blank areas in the second chart?

       

      The same thing happens in September with the Type D and in January, with Type C

       

      Thanks in advance

       

      PS: I'm using Qlik Sense 3.2 SR4