Skip to main content
Question

Why does the calculation result change?

  • January 27, 2022
  • 6 replies
  • 0 views

Forum|alt.badge.img+11

syntax[A]=1,syntax[B]=934

patern1: syntax[A]/934=0.0010706638115631692

patern2: 1/syntax[B]=0.0010706638115631692

patern3: syntax[A]/syntax[B]=0.023554603854389723

Only patern3 will give different results...

Please tell me the solution.

6 replies

Hello,

 

Could you please attach screenshot from the last calculation? I've done it in PQL and everything seems to be fine.

It was done in SQL?

 

Calculation 

Best Regards,

Mateusz Dudek


Forum|alt.badge.img+11
  • Author
  • Level 3
  • 3 replies
  • January 28, 2022

Hello.

Thank you for answering.

I uploaded a screenshot.

 

It was done in SQL?

>>>Yes

 

What's wrong?

 

1


Forum|alt.badge.img+5
  • Level 1
  • 2 replies
  • January 31, 2022

Forum|alt.badge.img+11
  • Author
  • Level 3
  • 3 replies
  • January 31, 2022

Hi, Ino Steinke

 

The same thing is happening...

If you find a solution, please let me know.

 


Forum|alt.badge.img+11
  • Author
  • Level 3
  • 3 replies
  • January 31, 2022

Hello,

 

Could you please attach screenshot from the last calculation? I've done it in PQL and everything seems to be fine.

It was done in SQL?

 

Calculation 

Best Regards,

Mateusz Dudek

Hello.

Thank you for answering.

I uploaded a screenshot.

 

It was done in SQL?

>>>Yes

 

What's wrong?

18


  • Level 0
  • 226 replies
  • February 11, 2022

Hello @ryotaro.manab 

 

sorry for late reply - it's probably underlying grouping problem.

F.e. if one sum is taking amounts from document level, and the second from document item level aditional calulation steps can be done in the background. I would using numbers having same "level" of data, it can be done by using domain table or PU functions. If mixed "levels" of data are used (SUM on document level, divided by SUM of item level) results can be strange as one of SUM statement will be automatically grouped again.

 

Additional note: screenshot seems to be PQL editor, so issue was located in the front-end. It's important because it affect the causes of the problem and available ways of solving it.

 

Hope that helps :)

 

Best Regards,

Mateusz Dudek