- Posts: 12104
- Thank you received: 2836
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Aber @holch, klemmt bei Dir die Tastatur?
Ist, glaube ich, jetzt das zweite Mal, dass ein Strichpunkt kommt, wo ein Komma sein soll
{sum(preis, preis*prozent/100)}
Please Log in to join the conversation.
Please Log in to join the conversation.
Komm, hör auf.Das schlimme dort ist, dass Microsoft meint es wäre eine gute Idee die Formeln zu "übersetzen".
Ja, kannst Du natürlich immer. Aber sage es vorher. Ich schaue in diese Privaten Nachrichten nicht oft hineinKann ich dir den Fragebogen auch privat schicken?
Please Log in to join the conversation.
Please Log in to join the conversation.
Falls Du die zwei Nachkommastellen erzwingen willst, also "25,20" wird es komplizierter.siehst Du, das ist der Vorteil des Alters.
Wir haben so etwas noch gelernt, was zu tun ist, wenn nur die Funktion "round()" für ganze Zahlen zur Verfügung steht.
Zunächst nimmst Du die Zahl mit der Zehnerpotenz mal, die Deiner gewünschten Nachkommastellenzahl entspricht.
10 für 1
100 für 2
1000 für 3
...
Also in Deinem Beispiel nimmst Du die 21,4475678... mit 100 mal und erhältst
2144,75678...
Diese rundest Du nun ganz normal und es gibt
2145
Und jetzt machst Du den ersten Schritt wieder rückgängig, indem Du durch 100 teilst.
Voila: 21,45
In LS-Syntax
{round(100*sum(Ausgabenvorher, Ausgabenvorher * wtp / 100))/100}
Wo kann man in LimeSurvey die Anzahl der Kommastellen einstellen?An sich weiß ich dass man dies bei Limesurvey einstellen kann,
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Meine Formel lautet: sum((Ausgabenvorher), (Ausgabenvorher * (wtp / 100))).
Please Log in to join the conversation.