Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
schmidtj
Creator II
Creator II

Display highest ween number within a month

Hi,

i have a bar chart where i have months on the x-axis and number of computers on the y-axis.

The months measure is a drilldown dimension where i can drill down to calender weeks of that month.

 

My goal is the following:

For each month i would like to display the metric (number of computers) for the latest calender week within that month.

In the attachment you will find an example table with my data.

The highst week in january 2019 is 05/19 with a metric of 490.

The month table however shows me 617. This makes sense, since here all weeks of that months are referred to.

 

Can somebody give me a hint on how to solve that problem?

The formular for my metric looks like this: Count(distinct COMPUTERNAME)

 

Thanks a lot,

John

1 Solution

Accepted Solutions
sunny_talwar

May be this

FirstSortedValue(Aggr(Count(DISTINCT COMPUTERNAME), Week, Year), -Aggr(Week, Week, Year))

View solution in original post

5 Replies
sunny_talwar

Where exactly are you doing this? In the script or the front end object?

schmidtj
Creator II
Creator II
Author

In the frontend.

sunny_talwar

May be this

FirstSortedValue(Aggr(Count(DISTINCT COMPUTERNAME), Week, Year), -Aggr(Week, Week, Year))
schmidtj
Creator II
Creator II
Author

That is working, thanks a lot.

I wish i would understand it completely though 🙂