Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Magogar
Contributor
Contributor

Graph. Filter and totalize by more than one field.

Hello.

I know it must be a very simple answer, but I can not find the solution. Can someone help me please?

I want to make a graph and I need to search the rows with the highest value in the "Period" field and return the average of the "Sales" field.

I have tried the following without success:

Avg (Max(Period) Sales)

Avg({$<Period={Max(Period)}>} Sales)

 

PeriodSales
1100
4150
2200
4100
280

 

Expected result:

PeriodSales (Avg)
4125
Labels (3)
1 Solution

Accepted Solutions
rubenmarin

Hi, can you try?:

Avg({$<Period={$(=Max(Period))}>} Sales)

 

$(=...) is converted before calculating the expression so at the end it executes:

Avg({$<Period={4}>} Sales)

View solution in original post

2 Replies
rubenmarin

Hi, can you try?:

Avg({$<Period={$(=Max(Period))}>} Sales)

 

$(=...) is converted before calculating the expression so at the end it executes:

Avg({$<Period={4}>} Sales)

View solution in original post

Magogar
Contributor
Contributor
Author

Thank you very much. It works perfect!!!