12 Replies Latest reply: Jan 27, 2017 10:19 AM by jyp jyp RSS

    Chart not showing zero values

    jyp jyp

      Hello,

       

      I'll explain my current situation in 4 points :

       

      1) I wrote a calendar :

       

       

      LET vMinDate = Num(Makedate(2015,1,1));

      LET vMaxDate = Num(Makedate(Year(Now()),Month(Now()),Day(Now())));

       

      ChampDate:

      LOAD date($(vMinDate)+IterNo()-1) as MaDate

      AUTOGENERATE (1)

      WHILE $(vMinDate)+IterNo()-1<= $(vMaxDate);

       

      Calendrier:

      LOAD

      MaDate as Date,

      Year(MaDate) as Annee,

      'T ' & Num(Ceil(Month(MaDate)/3),'(ROM)0') as Trimestre,

      Month(MaDate) as Mois,

      dual(applymap('MonthMap', Month(MaDate)), Month(MaDate)) as MoisNom,

      MonthEnd(MaDate)as DateFinMois,

      Week(MaDate) as Semaine,

      Year(MaDate) & ' ' & Num(Week(MaDate), '00') as AnneeSemaine,

      Weekday(MaDate) as JourSemaine,

      Day(MaDate) as Jour

       

       

      2) I have a table with documents :

       

      documents:

      Load *, TextBetween("doc_statement", '<METAITEM NAME="UnofficialTitle"><VALUE>', '</VALUE></METAITEM>') as documenttitle,

      TextBetween("doc_statement", '<METAITEM NAME="ToProject"><VALUE>', '</VALUE></METAITEM>') as projectid,

      Year(doc_insertdate) & ' ' & Num(Week(doc_insertdate), '00') as AnneeSemaine;

      SQL SELECT "doc_docno",

          "doc_key",

          "doc_insertdate",

          Year("doc_insertdate") as Annee,

          Month("doc_insertdate") as Mois,

         (...)

      FROM SI360PRD.dbo."doc_document";

       

      3 ) I have a table with projects (one document has a foreign key "projectid" pointing to his project)

       

      Projets:

      SQL SELECT "pr_recno" as projectid,

          "pr_prc_recno",

          "pr_prd_recno",

          "pr_ct_owner" as contactId,

          "pr_name",

          "pr_desc",

          ...

      FROM SI360PRD.dbo."pr_project";

       

      4)

      I have a chart, with

      Dimension : AnneeSemaine

      Expression : =count(doc_key)

       

       

       

       

      I want my chart to show a line even for the dimensions where expression value is 0.

       

      So I went to chart properties > presentation > uncheck 'suppress zero-values' and it is working fine.

      2017-01-26_12h47_10.png

       

      But when I select a departement (pr_project.pr_desc) , the chart updates itself, and the zero values are ignored, just as if the 'suppress zero-values' was checked !

       

      2017-01-26_12h49_08.png

       

      Can you help me please ?

       

      Thank you in advance,

       

      Jean-Yves