[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 100
  • Last Modified:

how to calculate Quintiles in ssrs

How to calculate Quintiles value in SSRS. I want to calculate the Quintiles base on average field.

My table is as below
Select ID, Department, Average
0
Bharat Guru
Asked:
Bharat Guru
  • 2
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Don't know about SSRS, but it is possible in the T-SQL data set that feeds it by using the SQL Server NTILE() function.   (SQL 2012 and higher)
SELECT ID, Department, Average, 
    NTILE(5) OVER(ORDER BY Average DESC) AS Quintile
FROM YourTable

Open in new window

1
 
Bharat GuruAuthor Commented:
I'm looking for in SSRS expression
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
afaik there is not an SSRS expression that handles percentiles.   Just out of curiosity, why is your requirement to do this in an SSRS expression?  Data manipulation is best done in the database layer (database) and not the presentation layer (reporting), and if the data source has embedded T-SQL you can just add the NTILE function.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now