5 Replies Latest reply: Oct 30, 2018 5:23 AM by Stefan Thalhuber

Percent calculation

Good day

I want to calculate a percentage of two measures in Qlik-Sense.

The key figures have already been created in the master elements and also deliver the correct result.

Measure1 - amount of yield: count ({<M.MEASURE_Result = {Error}>} M.MEASURE_VALUE)

Measure2 - total: count (M.MEASURE_VALUE)

Which formula do I have to use here so that I get the percentage of Errorr quantities.

As X% of total amount have an error!

Many Thanks

Stefan

• Re: Percent calculation

I think Measure1/Measure 2 should give you

Sometimes you may have to multiply by 100

(Measure1/Measure2) * 100

• Re: Percent calculation

May be

Num(count ({<M.MEASURE_Result = {Error}>} M.MEASURE_VALUE),'#,#0%')

• Re: Percent calculation

Good Morning!

Thanks for the answer but this is not working!

The result with this is:

Measure Error: 73753

Measure Value: 5141065

Result is: 7375300,00%

So I just get the Errors is %

But the result should be: 1,435%

Do you have an Idea i i get this fixed?

Thanks, Stefan

• Re: Percent calculation

Create a new measure

Error%: ([Measure Error] / [Measure Value]) * 100

Measure error and Measure Value are the labels of your expression

• Re: Percent calculation

Hi Stefan,

See calculation below:

Num(count ({<M.MEASURE_Result = {Error}>} M.MEASURE_VALUE)/count (M.MEASURE_VALUE),'#,###%')

Thanks,

Vitalii

• Re: Percent calculation

Hello Vitalii

thanks! Now it is working!

br Stefan