2 Replies Latest reply: Mar 22, 2016 6:39 AM by Uday Pasupuleti RSS

    Line Chart - Show Months without Sales

    Annick Whitfield

      Hello,

       

      I would very much appreciate your help for the following problem.

       

      I have created 2 tables, sale and calendar , linked by the field "Month" as follows:

       

      Sale:
      Load * inline
      [ID, Month, Country,  Price
      1,  1,   FR,  100
      2,  1,   US,  200
      3,  3,   FR,  120
      4,  3,   FR,  210
      5,  5,   FR,   300
      6,  5,   US,   200
      ];


      Calendar:
      Load * inline
      [Month, MonthName
      1,   January
      2,   February
      3,   March
      4,   April
      5,   May
      6,   June
      7,   July
      8,   August
      9,   September
      10,   October
      11,   November
      12,   December
      ];

       

      I want to display 2 line charts:

      • Trend sales (for all countries)

          - Dimension: MonthName

          - Measure: Sum(Price)

       

              ==> All months are correctly shown, even the ones without any sale (e.g. February, April ...):

          

      • The second chart reflects the trend of the total sales but excluding US country:

          - Dimension: MonthName

          - Measure: Sum({$<Country -= {'US'}>}Price)

       

      ==> The months without sales are not shown:

       

       

       

       

      I wonder if there is a way to reflect these months without sales (e.g. February, April etc...) without changing the data model and the load script, ideally just changing the measure above ( i.e. Sum({$<Country -= {'US'}>}Price))  .

       

      Many thanks in advance for your help!

       

      Annick