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

Simplify Graph Formula

Hi all,

I encounter a performance issue with a graph :

Here is some context : this is a combo graph, with a dimension (a hierarchy with Activity and then Axis), and three mesures. The three mesures have the same formula, described here, except for the AVG, replaced with Min and Max for the two others.

We are able to filter on a periode thanks to another graph, or some filter panels.

The client wants to see the result aggregated for each Activity/Axis and each period filter, depending on the selection, and we had to put the formula described here, but since then the graph takes a long time to load, and sometimes will put an error message because of expired timeout.

Does anyone see how to simplify the formula ?

pick(match($(Level_H_ORGA),'Activity', 'Axis')
, pick(match($(Level_H_TIME),'Year Month', 'Date', 'Hour')
, AVG(aggr(sum([Mesure1]), [Activity], [Year Month]))
, AVG(aggr(sum([Mesure1]), [Activity], Date))
, AVG(aggr(sum([Mesure1]), [Activity], Hour))
)
, pick(match($(Level_H_TIME),'Year Month', 'Date', 'Hour')
, AVG(aggr(sum([Mesure1]), [Axis], [Year Month]))
, AVG(aggr(sum([Mesure1]), [Axis], Date))
, AVG(aggr(sum([Mesure1]), [Axis], Hour))
)
)

Thanks,

Martin.

1 Solution

Accepted Solutions
sunny_talwar

How about this

Avg(Aggr(
  Sum([Mesure1])
, $(='[' & $(Level_H_ORGA) & ']'), $(='[' & $(Level_H_TIME) & ']')))

View solution in original post

2 Replies
sunny_talwar

How about this

Avg(Aggr(
  Sum([Mesure1])
, $(='[' & $(Level_H_ORGA) & ']'), $(='[' & $(Level_H_TIME) & ']')))
Martin22
Partner - Contributor III
Partner - Contributor III
Author

It's just great, thanks a lot !

I have other formulas of the same type, I will try to adapt your solution.

Thanks again !