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

Top 10 Values

I need to display the top ten values in a pivot chart based on the highest count.

The expression used is:=IF(date(INC_SUBMIT_DATE) > date($(vSliderDate)),count (DISTINCT INCIDENT_NUMBER))

where vSliderDate is the value that is given as an input from the user.

8 Replies
Not applicable
Author

can you try using the Dimension Limits tab?

Not applicable
Author

Pivot table doesnot have this tab

Anonymous
Not applicable
Author

Something like below,

In dimension,

Aggr(If(Rank(If(date(INC_SUBMIT_DATE) > date($(vSliderDate)),count (DISTINCT INCIDENT_NUMBER)))<=10, DIMENSION), DIMENSION)


Expression should be same as your above script.

PS: There might be a typo error in above script. You can follow below generic logic.

=Aggr(If(Rank(Sum(Expression))<=10,Dimension),Dimension)

jagan
Luminary Alumni
Luminary Alumni

Hi Anitha,

Please find attached file for solution.

Regards,

Jagan.

Not applicable
Author

Did not find the attachment

Not applicable
Author

This is displaying the lowest 10 values not the top... I think its taking the least expression value as the first rank. I need to get the highest count to be the first rank

jagan
Luminary Alumni
Luminary Alumni

Hi Anitha,

Please find attached file for solution.

Try like thi

Dimension: =if(aggr(rank(SUM(Sales),4,0), DimensionName)<=3,DimensionName)

Expression: =Sum(MeasureName)

Regards,

Jagan.

Anonymous
Not applicable
Author

Strange. Can you only use Rank function with expression and see what kind of rank you are getting? If possible share some sample qvw for fastest resolution.

Rank(If(date(INC_SUBMIT_DATE) > date($(vSliderDate)),count (DISTINCT INCIDENT_NUMBER)))