Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Remco
Contributor III
Contributor III

Find the Max or Min in a graphic

Hi all!

In a simple graphic a have my dimension being a year. For each year I have the data points by just using the measure "Avg(FinalCorrectedResult)". Now, in the graphic I have boundary lines being + 350 and - 350. Straight forward.

Now, when one of the averages shown on the graphic goes out of the negative boundary I want this static line to move with it being something like 1.2 times this negative value. What I tried is this one:

=If(Avg(Total(FINALCORRECTEDRESULT)) < -350, Avg(Total(FINALCORRECTEDRESULT)) * 1.2,-350)

But then it returns the average of the full period. What I want to find out is the lowest value of all dimension and then use that value.

In the picture you can see that the red line now is somewhere at -1350 while I want it to be 1.2 times the lowest value, in this case for 2021, where it seems to be about -1600. So, eventually the value should be 1.2 * -1600.

How do I pick up this value that now is at 2021?

Capture.JPG

 

1 Solution

Accepted Solutions
Remco
Contributor III
Contributor III
Author

I found the solution myself 🙂

 

=If(Min(Total Aggr(Avg(ECO_RESULT),ECO_SALESYEAR)) < -350, Min(Total Aggr(Avg(ECO_RESULT),ECO_SALESYEAR)) * 1.2, -350)

View solution in original post

1 Reply
Remco
Contributor III
Contributor III
Author

I found the solution myself 🙂

 

=If(Min(Total Aggr(Avg(ECO_RESULT),ECO_SALESYEAR)) < -350, Min(Total Aggr(Avg(ECO_RESULT),ECO_SALESYEAR)) * 1.2, -350)