Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qolkaram
Contributor III
Contributor III

Sum Up Top N

HI every one ,

I have below sample data:

REPORT_DATE

month

Site_ID

outage

6/1/2016

2016-06

1

120

6/2/2016

2016-06

1

500

6/1/2016

2016-06

2

300

7/1/2016

2016-07

4

120

7/2/2016

2016-07

3

500

7/2/2016

2016-07

3

300

I want to sum up Top N Site Outage per month (first i should calculate site outage per month then sum up top N site outage per month) .  I have to do it in front end (in expression) not in script.

I appreciate if someone help me.

15 Replies
jyothish8807
Master II
Master II

Hi Nassim,

What do you mean by Top N over here ? N could be any value ?

BR,

KC

Best Regards,
KC
tresesco
MVP
MVP

Try like:

=Sum(Aggr(If(Rank(Sum(outage))<=vTop, Sum(outage)), Site_ID))

Capture.PNG

qolkaram
Contributor III
Contributor III
Author

Topn.jpgthanks Tresesco  , but  need Top N per Month , actually finally i need a chart like below

tresesco
MVP
MVP

PFA

qolkaram
Contributor III
Contributor III
Author

Sorry Tressco i couldn't reply on your last post ,

by the way , i don't want to add site_id in Dimension ,( As you can see in the chart there is two bar for each month total monthly outage and top25Site outage ) so now how can i first calculate monthly sum of outage per side_id and then  sum up Outage of  top N site_id .

qolkaram
Contributor III
Contributor III
Author

some actual data attached

tresesco
MVP
MVP

Not really sure about your requirement.

qolkaram
Contributor III
Contributor III
Author

during last week i tried to find a solution but still i am confused .

tresesco
MVP
MVP

Now since you are here, please try more on clarifying your requirement better.