Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
temok
Contributor
Contributor

Cahnge Format in a formula

Hello,

I have the following problem with a formula. In this formula, I perform with rangesum Value List and some calculations. However, some of my values ​​are displayed with a different format.

I would like to have the areas marked in the format with two decimal places.

Here is an example of the Pivot table and the corresponding formula.

Many thanks for your help

rangesum(

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'Anzahl Sdg.NVK',

count(distinct if(match(auftrags_art,'fremd'),if(Abrechnungsart='4 - NV-Zustellung', if(ausgangsart_Key='R' ,(auftrags_Key)

)))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'Gewicht NVK',

sum( if(match(auftrags_art,'fremd'),if(Abrechnungsart='4 - NV-Zustellung', if(ausgangsart_Key='R',(gewicht)

)))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'Kosten NVK',

sum(if(match(auftrags_art,'fremd'),if(Abrechnungsart='4 - NV-Zustellung', if(ausgangsart_Key='R',(betrag * faktor)

)))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'Anzahl Sdg.Rück',

count(distinct if(match(auftrags_art,'fremd'), if(int_ext='von Partner' ,(auftrags_Key)

))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'Gewicht Rück',

sum(if(match(auftrags_art,'fremd'), if(int_ext='von Partner' ,(wgew)

))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'Erlöse Rück',

sum(if(match(auftrags_art,'fremd'),if(Abrechnungsart='5 - Rückrechnung (Belastung)', if(ausgangsart_Key='R',(betrag * faktor)

)))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'DB1(Summe)',

$(vGesamt)

)

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'DB1 (%)',

rangesum(

($(vGesamt))*100

/sum(if(match(auftrags_art,'fremd'),if(Abrechnungsart='5 - Rückrechnung (Belastung)', if(ausgangsart_Key='R',(betrag * faktor))

)))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'DB1 (pro Sdg.)',

rangesum(

($(vGesamt))

/(count(distinct if(match(auftrags_art,'fremd'), if(int_ext='von Partner' ,(auftrags_Key))

)))))

,

if(valuelist('Anzahl Sdg.NVK','Gewicht NVK','Kosten NVK','Anzahl Sdg.Rück','Gewicht Rück','Erlöse Rück','DB1(Summe)','DB1 (%)','DB1 (pro Sdg.)','DB1 (pro 100 KG)' ) = 'DB1 (pro 100 KG)',

rangesum(

($(vGesamt))*100

/(sum(if(match(auftrags_art,'fremd'), if(int_ext='von Partner' ,(wgew))

)))))

)

5 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Hi,

Have you tried to use the Num() Function?

The num function formats the expression numerically according to the string given as format-code. For a description of the formatcode, Decimal separator and thousand separator can be set as third and fourth parameters. If the parameters 2-4 are omitted, the number format set in the operating system is used.

Cheers - DV

SunilChauhan
Champion II
Champion II

Use the below

Num( yourexpression,'#.##')

hope this helps

Sunil Chauhan
temok
Contributor
Contributor
Author

Thanks for your answers.

But the Num () function does not work.

IAMDV
Luminary Alumni
Luminary Alumni

Please can you post the QV document? Scramble the document if you have sensitive data. It will be easy to work with the document.

Thanks - DV

temok
Contributor
Contributor
Author

Hi,

I am currently not in the office. I'll post the QV document tomorrow.