1 Reply Latest reply on Jan 4, 2018 2:54 PM by swaroop.gantela

    Table Calculation and count value

    Javiera Morales

      Hi!

      I want to calculate how many times a value is shown in a table.. for example, I have a table by day of month like this

       

      month december 2017

      day      Nº Vehicles

      1          3    

      2          1

      3          1

      4          2

      5          1

      6          3

      7          3

      ...          ...

       

      I want to know how many times the number 3 is shown.. My problem is that the numbers are calculated using a calculated field call Max Vehicles with this formula:

      IIf(LAST()==0,WINDOW_MAX(COUNTD([Facturacion])), Null), where Facturacion is calculated using this formula: MAX ([Vehicle Id], [Driver Id])

       

      So I created a calculated field call count that has this form:

      IF COUNTD([Facturacion]) = [Max Vehicles]

      THEN 1

      ELSE 0

      END

       

      When I want to see the value that Count gives me is only 0 and one 1.. I don't know how to do it, because as Max Vehicles is a table calculation then Count is also a table calculation so I only can see it as AGG.

       

      Thanks