Nexel Calculation Problem

I am trying to use COUNTIF in nexel but it is not giving me what I am expecting. The formula is as follows for each block in the Priority column: -

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;1;*] )

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;2;*] )

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;3;*] )

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;4;*] )

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;5;*] )

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;6;*] )

=COUNTIF ( [@f;*;Range(1:7)], "<=" & [@f;7;*] )

This is what it is giving me in Board.

ProductMin QtySafety StockMax QtyDaily Sales QtyFG StockStock DaysPriority
170484228521142774728457111.3186
23050485411228780323411281173.9611
31367776594205161145011148907.9234
42668300118003028286002221.2246
54506182963379564777283885.9434
696832711324208410266406703.9623
7315283941020493333427788202.3580

 

This is what the same calculation gives me in Excel.

 

AB
11.318

6

3.9612
7.9235
21.2247
5.9434
3.9623
2.3581

 

=COUNTIF(A$2:A$8,"<="&$A2)

=COUNTIF(A$2:A$8,"<="&$A3)

=COUNTIF(A$2:A$8,"<="&$A4)

=COUNTIF(A$2:A$8,"<="&$A5)

=COUNTIF(A$2:A$8,"<="&$A6)

=COUNTIF(A$2:A$8,"<="&$A7)

=COUNTIF(A$2:A$8,"<="&$A8)

 

Thanks in advance

Answers

  • Hi Andrew Smeets,

     

    Might be due to rounding in dataviews cells - can you round the numbers to 3 decimal digits and check if it's still the case?
    Michele

  • Hi Michele

    All dataview cells are 0 (zero) except for the priority column which is 3.

    Andrew

  • I mean the Stock Days column is set to 3. All others 0.

  • Unknown
    edited March 2020

    Hi Andrew,

    i tried now and it works fine for me when rounding the stock days to 3 digits with a column algorithm.

     

    image

     

    I tried by inputing the exact numbers and it also worked fine, then i changed them slightly (different number of decimal digits after the 3rd even though i was still displaying 3), added a round algorithm and calculated the countif on top of the rounded block.

    What i believe is happening is that the calculation / data for the stock days has actually more than the 3 digits you display and when Nexel runs it actually calculates on the original full value with all decimals, not on 3 decimals. Forcing it to be exactly 3 decimals with a round formula in an algorithm should make it work.


    Try and let me know  

    Michele

  • Hi Michele

    Thanks very much that works. It does not make sense though.

    Andrew

  • When you set a decimal digits display in a BOARD block, it is ignored in Nexel - it's just for visualisation of the data, it doesn't apply a real rounding (you have to specify the rounding as a column algorithm if you want that). When Nexel runs it takes the value at maximum precision.

    I agree with you that it should work anyway, but what most likely happening the Nexel library is not able to run properly the IFCOUNT comparison at the precision coming from the BOARD layout in this case - so one of the 2 elements in the IFCOUNT is at a different level of precision. by forcing a rounding in the layout itself we solve this.

  • Thanks again. First time using Nexel. I will remember that for next time.