Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am struggling to calculate my % on my report.
I attach a test qvw with my calculations.
The % results should be as follows from Jan - Dec.
54.8% | Jan |
87.2% | Feb |
90.2% | Mar |
82.7% | Apr |
87.3% | May |
89.0% | Jun |
88.3% | Jul |
88.6% | Aug |
87.7% | Sep |
83.5% | Oct |
85.8% | Nov |
86.7% | Dec |
Basically the calculation should be the count of 4 & 5 results divided into the count of ID by Month and shown as a %.
I thought a test qvw would help to explain what I am trying to achieve.
Your help would be much appreciated.
Kind Regards
Wendy
So I guess the Numerator (your first expression isn't counting correctly, right?
I took a extract out from your data and filtered on 4 and 5 results. The filtered row were 189 out of total of 337 and 189/337 = 56.08%
Would you be able to explain how you are getting the numbers you posted above?
Thanks Sunny,
You are correct. I think I have been looking at this issue so long I have got myself muddled.
What I really need to do now is instead of the ID count, I need to count all the results which will give me the % I am looking for. Please see below.
Results 4 & 5 | Result | % | Month |
190 | 228 | 83% | Jan |
259 | 297 | 87% | Feb |
266 | 295 | 90% | Mar |
186 | 225 | 83% | Apr |
227 | 260 | 87% | May |
211 | 237 | 89% | Jun |
219 | 248 | 88% | Jul |
202 | 228 | 89% | Aug |
185 | 211 | 88% | Sep |
232 | 278 | 83% | Oct |
206 | 240 | 86% | Nov |
78 | 90 | 87% | Dec |
It's the sum on the Result I am struggling with if you could help with that calculation I would appreciate it.
Many Thanks
Kind Regards
Wendy
Try this:
Count({<Result = {4, 5}>} Result) /Count(Result)
or
Count({<Result = {4, 5}>} ID) /Count({<Result = {'*'}>}ID)
Hi Sunny,
Thank you.
Your a Star. That works.
Kind Regards
Wendy
Super. I would request you to please close the thread by marking correct and helpful response.
Qlik Community Tip: Marking Replies as Correct or Helpful
Best,
Sunny
Hi Sunny,
I would really like to mark this as correct but I am struggling to do so. When I click on Actions I only get helpful.
Not sure what I'm doing wrong but you have been so helpful I would like to acknowledge that. I will get the hang of this eventually.
Wendy
Wendy -
This might be a browser issue. If possible, try to check if you see the option to mark correct answer on another browser. This might take some extra effort for you to do this, but this will help people in the future who might have similar issue and land up on this thread to find the correct and helpful answers.
Thanks,
Sunny