4 Replies Latest reply: Nov 1, 2011 12:30 PM by Michael Solomovich RSS

    Group By - is not grouping :(

      Hi folks, I'm having problems with the below script.

       

      Cal1:
      Load Date([Submit Date], 'DD/MM/YYYY') AS [Running Date],
      [Incident Number] AS [Open Cases],
      0 AS [Open Changes Requests],
      Date([Submit Date], 'DD/MM/YYYY') AS CalcDate,
      Date([Submit Date], 'DD/MM/YYYY') AS [Date],
      Date([Submit Date],'YYYYMM') as YearMonth,
      Month([Submit Date]) AS MonthNr,
      WeekDay([Submit Date]) AS Week,
      MonthName([Submit Date]) AS [Month],
      Year([Submit Date]) as [Year]
      resident Crudo;

      Cal2:
      Load CalcDate,
      Count(DISTINCT [Open Cases]) as tttt
      resident Cal1
      GROUP BY CalcDate;

       

      According to me what I'm specting is to have the quantity of open cases by different dates. But what I'm getting is the value 1 repeted several times on the same date times the records for each dates and so on.

       

      Thanks in adavance for any help!!