5 Replies Latest reply: Sep 11, 2017 3:55 PM by Michael Solomovich RSS

    IF() function on bar chart

    Pierre Leclou


      I am creating this post because I am meeting a strange issue with the function IF() in a bar chart.


      Context :
      I have a board with a column that gives me a a closing date. But the format isn't a date because there are lines where it is indicated "Non" instead when the project isn't over yet. I know how to change it into a date but I wanted to keep it as a text here.

      I have another column that gives me the status of the stakeholder(client, supplier, internal).

      Example :

      Closing DateStakeholder



      What I want is a stacked bar graph that gives me the number of projects with no closing date ("Non") for each stakeholder.

      2017-09-11 13_50_52-RNC Qualité TABLEAUX_DE_BORD1 - Excel.png

      Because I didn't know how to do it on a stacked chart, I first tried to do a bar chart with 3 bars : client, internal and supplier, and the number of "Non" for each (3,1,1 with the example above).

      So I put Stakeholder as the dimension and
      IF([Closing Date]='Non', COUNT([Stakeholder])) as a measurement,
      but it gives me no results !

      I checked : IF([Closing Date]='Non', 14, COUNT([Stakeholder])) and it gives me the same results than COUNT([Stakeholder]).

      So it looks like the condition [Closing Date]='Non' doesn't give any result.


      What I find really strange is the fact that when I create a window "Text and image" with this formula (And a filter "Closing Date") :
      IF([Closing Date]='Non',COUNT([Stakeholder]),'Cookies')

      It gives me the COUNT([Stakeholder]) when I select 'Non' and 'Cookies' when I select something else.

      In other words, the formula looks correct and works in the window "text and image" but not in a bar chart.

      I am lost !