locked
SSRS adding extra data into my histogram chart? RRS feed

  • Question

  • I am trying to create a chart that shows frequency distribution. I am trying to plot the following data which is on a table in a database, but I've made it into a simple temporary one here to be able to show what it looks like.

    CREATE TABLE #t (score int)

    INSERT INTO #t VALUES (25),(35),(37),(37),(38),(38)

    SELECT * FROM #t


    With this dataset on my chart it shows that I have 4 values as 37 instead of 2. 

    Does anyone know why I am getting extra data in my chart?


    • Edited by carlosl-25 Friday, September 22, 2017 9:37 PM
    Friday, September 22, 2017 9:37 PM

All replies

  • This is a very simple data-set and obviously should only show 2 instances of 37.

    I suspect your issue is something to do with the actual data set you are using perhaps.

    Can you elaborate on your actual data set and the graph it displays?


    Thanks for reading!
    If you found my answer useful please mark as answered
    David

    Saturday, September 23, 2017 8:02 PM
  • Hi carlosl-25,

    May I know what is your actual dataset like? Also, which type of chart are you using and how do you set the chart in SSRS? What expression did you use in the chart to calculate the frequency distribution? You could use SSRS expression to calculate the frequency like 

    = CountDistinct( IIF(Fields!score.Value="37", Fields!score.Value,Nothing) )

    Or you could add one more column in your original query to calculate the frequency. You could refer to Counting Duplicate Records based on a single field in SSRS

    Otherwise please provide more details about your report design, with some screenshots if possible. 

    Best Regards,
    Henry 

    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Proposed as answer by Henry Jiang Tuesday, September 26, 2017 8:50 AM
    Monday, September 25, 2017 2:19 AM