Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Minimum value of the month inside the year

Hello Everyone,

I need to calculate below:-

In chart i have Year as Dimension and Measure is Avg(Average Hourly Rate). We have data for 3 years.

Now i want to calculate Best of 2019 like below

In year 2019 , i have values for 12 months. So if the year is maximum , it should give me the minimum value for the months present in the latest year.

Can any one please help:-

For below , the maximum year is 2019, so it should return the ,minimum value from the months present in 2019.

Aspiring_Developer_0-1599660546486.png

@sunny_talwar  @Kushal_Chawda 

1 Solution

Accepted Solutions
Kushal_Chawda

@Aspiring_Developer  try below. Create table with Dimension Year and below two expressions

// for value

=FirstSortedValue(aggr(sum({<Year={"$(=max(Year))"}>}Value),Year,MonthYear),aggr(sum({<Year={"$(=max(Year))"}>}Value),Year,MonthYear))

// for month

=FirstSortedValue(MonthYear,aggr(sum({<Year={"$(=max(Year))"}>}Value),Year,MonthYear))

View solution in original post

4 Replies
Kushal_Chawda

@Aspiring_Developer  try below. Create table with Dimension Year and below two expressions

// for value

=FirstSortedValue(aggr(sum({<Year={"$(=max(Year))"}>}Value),Year,MonthYear),aggr(sum({<Year={"$(=max(Year))"}>}Value),Year,MonthYear))

// for month

=FirstSortedValue(MonthYear,aggr(sum({<Year={"$(=max(Year))"}>}Value),Year,MonthYear))
sunny_talwar

For Value, you can just do this

Min(Aggr(Sum({<Year = {"$(=Max(Year))"}>} Value), Year, MonthYear))
Aspiring_Developer
Creator III
Creator III
Author

@sunny_talwar 

It should return the minimum value ie.  like below Year 2020 , Feb2020 has the minimum value i.e 68843.196

Aspiring_Developer_0-1599663808330.png

 

sunny_talwar

What is this returning?

Min(Aggr(Sum({<Year = {"$(=Max(Year))"}>} Value), Year, MonthYear))