Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gauravgg
Partner - Creator
Partner - Creator

Transpose and store 3 month data?

Hi I have the following table

Table:

DateDomainTicket_No
01/01/2017ATT1
01/12/2016BTT2
01/11/2016ATT3
01/10/2016BTT4
01/09/2016ATT5

I want to store only previous 3 months(I want to compare Date with System date and then take previous 3 month data excluding current month) data  in Qvd  ,and want to group by domain and store count of Ticket_No

in table as follows:

I want to make the table in Script

Output_Table

DomainDec-2016Nov-2016Oct-2016
A111
B111

Thanks in Advance

1 Reply
miskin_m
Partner - Creator
Partner - Creator

Hi,

LOAD date(Date) as Date,

     Domain,

     count(Ticket_No) as total_count

FROM Table where date(Date) >= AddMonths(MonthStart(Today()),-3) and date(Date)<MonthStart(Today())

Group by Domain,Date;