Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
braham
Creator
Creator

Creating a filtered Average

I would appreciate some assistance to extract a table from a transaction file. I want to do all the calculations in the front end. The transaction file has many fields, but the ones of interest are a value field, a CPT Code field and an Authorisation field. Each CPT value is made up of several authorisation, and each authorisation is made up of many transactions. The following table will explain the scenario better that trying to describe it. The required output is the CPT code and the average of Authorisations associated with that CPT. The issue at hand is that I only want to include transactions that fall within +95% and -95% of the original average. You will see that the original average is 494, but if we exclude the 2 values that fall outside our parameters (10 and 2,000) the new average is 366. 

CPT Auth No Sub Total (From Many Transactions) Include In Average
A 1 100 Y
A 2 200 Y
A 3 400 Y
A 4 500 Y
A 5 700 Y
A 6 10 N
A 7 2,000 N
A 8 230 Y
A 9 300 Y
A 10 500 Y
       
  Average 494  
  Min (95%) 25  
  Max (95%) 963  
       
Required Output    
CPT   Value  
A   366  
Labels (1)
2 Replies
Clement15
Creator III
Creator III

Hello, using the fratile function could not help you?

Fractile - chart function | QlikView Help

braham
Creator
Creator
Author

Thanks Clement15, I have not used the  fractile function, but will read up it from the link you provided and test to see if I can get it to work.