Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Berechnungsfehler Calculation errors

More
6 years 11 months ago #151846 by LDBV
In einer Matrix kann man (nur) Zahlen eingeben, diese werden mit dem Preis multipliziert. Das Ergebnis wird in einem (eigenen) Ausgabefeld angezeigt.

Bei einem Preis von …,20 € wird bei einem Multiplikator von 1, 2, 4, 5 das Ganze normal ausgerechnet (mit 1 Nachkommastelle, also z.B. …,4 ). Multipliziert man mit 3, 6, 7, dann wird ein Ergebnis in der Art …,6000002 angezeigt.

Limesurvey: Version 2.64.1+170310

Zur Erklärung 3 Screenshots:

The topic has been locked.
More
6 years 11 months ago #151849 by jelo
Replied by jelo on topic Berechnungsfehler Calculation errors
Kannst Du einen Export der Befragung hier an den Thread anhängen?
Du willst wirklich eine Weinbestellung via LimeSurvey realisieren? Oder ist das nur ein Beispiel?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
6 years 11 months ago #151853 by LDBV
Replied by LDBV on topic Berechnungsfehler Calculation errors
danke für die schnelle Antwort. Es ist kein Beispiel sondern eine verkürzte Version einer größeren Weinbestellungsumfrage eines Kollegen bei uns.
The topic has been locked.
More
6 years 11 months ago - 6 years 11 months ago #151854 by LDBV
Replied by LDBV on topic Berechnungsfehler Calculation errors

File Attachment:

File Name: limesurvey...3-29.lss
File Size:16 KB
Last edit: 6 years 11 months ago by LDBV.
The topic has been locked.
More
6 years 11 months ago #151859 by jelo
Replied by jelo on topic Berechnungsfehler Calculation errors
Diese Art Fehler gibt es unter PHP häufiger. Da werden vermutlich im Hintergrund verschiedene Variablentypen von Nummern zusammengemischt.

Mit round solltest Du das Problem vorerst in den Griff bekommen.
Code:
{(round(sum(F404_SQ041_SQ401*57.2,F404_SQ042_SQ401*50.0),2))}

Schräges Beispiel mal zum Check:

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: LDBV
The topic has been locked.
More
6 years 11 months ago #151884 by jacob
Replied by jacob on topic Berechnungsfehler Calculation errors
Du kannst soweit ich weiß, auch die 0.2 trennen:

Zwischensumme: {((F404_SQ041_SQ401*57)+F404_SQ041_SQ401*0.20)+(F404_SQ042_SQ401*50.0)} €

Gruß
Jacob
The topic has been locked.
More
6 years 11 months ago #151890 by LDBV
Replied by LDBV on topic Berechnungsfehler Calculation errors
Hallo jacob
Danke für die Lösung; wurde erfolgreich getestet.
Gruß
Heiner
The topic has been locked.
Moderators: Joffm

Lime-years ahead

Online-surveys for every purse and purpose