Discussion board where members can learn more about Qlik Sense App Development and Usage.
trying to calculate a number to percentage...
managed to change the format to custom and 0% no problems there, its just my calculation I need help with please?
I have a number of customers every month, and a bar chart that shows these total number of customers per month for a year
e.g Jan 1000 Feb 1500 Mar 1300 ect
but I have calculated too a KPI how many customers had product delivered in 7 days. (done in data load editor and creates the field "Delivered Within 7 Days")
I want to work out a percentage
that e.g in Jan out of total number of customers for the month (this case a 1000) how much in percentage of customers had their product delivered within 7 days
I got a code like this but it just gives me 100% for all months
(count([Delivered Within 7 Days]) )/ count ([customer])
Go to Solution.
Try this out:
Sum([Delivered Within 7 Days])/Count([customer])
I understand what you are looking for, but not entirely sure how your data looks, would you be able to share some sample data for Delivered Within 7 Days and Customer columns together with your dimension you are using.
sorry cant post as office work... but all I know there is something wrong with the calculation
can you please amend so all values show correctly and not all show 100% please
What does [Delivered Within 7 Days] column include? Does it say yes and no or does it only have value when its true? Until I know what's the content of that field, I won't know the problem.
"Delivered Within 7 Days" field
it contains a 1 if true and 0 if false
No problem! I am glad I was able to help.
I have question similar to above calculation. I need to calculate percentage in measure based on following pre-selected field.
Suppose pre-selected field from below image is part number, revision letter, serial number so what is percentage of selected value in unit(percentage calculate as true= true/ true+false)?
eg: if you choose 30G2305_A(part number) , K(revision letter), LENCAR3345(serial number) so what are the percentage of true in this combination? I am adding this percentage in measure.
thanks for helap in advance