Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
elizbr
Contributor
Contributor

Combo Chart Percentage Calculation

111e42a2-6382-481b-9815-a97f0a9b3438.PNG

In this combo chart, I am using two axes: the left for counts of correct and incorrect counts. 

The right axis I am using to show the percentage of correct to overall. (The x axis is cumulative from .99 down to .01).

I am calculating the pink line measure on the right axis (sorry about the colors). 

If the expression I am using is sum(matched) / count(matched), why is this not coming out correctly. 

As you can see in the screenshot above, with the hover over info, there are about 200 incorrect and over 125k correct matches yet the pink percentage calculation is .91... obviously not right. Let me know if there is something I could be missing? I am very new to this software. 

Labels (1)
3 Replies
Or
MVP
MVP

What are the actual formulas / contents of the Incorrect and Correct measures? Is the matched field a 0/1 flag? Might other tables in your data model be causing duplication for the count() part? Very hard to say what the issue might be since there's missing information here.

elizbr
Contributor
Contributor
Author

I guess I am actually instead trying to ask if there is a way to take the values shown on the pop-up for the correct & incorrect match cumulative subtotals to generate a cumulative percent correct line on the second axis. (because the problem definitely lies in the aggregation of the cumulative set up). 

Or
MVP
MVP

In theory, if these are master measures, you could reference them directly (assuming your QS version isn't too old):

[Incorrect Match]  / ([Correct Match] + [Incorrect Match])

But depending on the accumulation and aggregation involved, this may or may not actually help - no way to even guess at it without the underlying formulas and data structure.