Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr() question

Hi all,

I'm having touble with some analysis that is sure to be difficult to explain in text. I have two corresponding abstracts that show cell phone voice minute usage (with a dimension of pre-loaded buckets) and an accompanying detail breakdown for the minute usage chart. See below:

Capture.PNG

When I select a specific bucket, the detail list updates to only includes the numbers that fall in that bucket, like below:

Capture1.PNG

I'd like to change these graphs slightly. I want to include an input box that allows a user to indicate the number of months for which each number has fallen in its respective bucket. For instance, if I want to look at users who have "0 Minutes of Use" - I want the added functionality to choose only the numbers that have had 0 minutes of use for the past "X" months. I can't do this in the load phase because it needs to update in real time with an input box.

Not only do I need to have the y values of the bar chart update (I've achieved some sort of success with this expression, where "3" is the # of months I'm looking back at:

sum(if((aggr(count(PhoneLineNumber), PhoneLineNumber))>=3, 1,0))

but I need to make sure that the SET of values (dimension) is resctriced to only those phone numbers (choosing only those values in the y expression doesn't select those specific phone numbers, it simply chooses to only show that set). I need this to happen because my accompanying graph has expressions like this, where it is updated based on the selection of numbers from its parent graph with the P() function:

sum({<PhoneLineNumber = P(), UsageDataBands=, UsageVoiceBands= >}DetailReportMonthlyCharge)+

sum({<PhoneLineNumber = P(), UsageDataBands=, UsageVoiceBands= >}DetailReportProratedCharge)

I hope I didn't completely lose you with that explanation. I think I need to update my dimension to have some sort of Aggr() function. Does anyone have any ideas?

Thanks,

Paul

1 Reply
jolivares
Specialist
Specialist

I recomend to you, generate some sample data and post a qvw to help you.