cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO GET FILTERED DATA

former_member196948
Participant
0 Kudos

HI All,

I have an query, i have data like how to get filtered data


i have data like below


we have started this report with below data for Oct 2014 to Dec 2014


QUARTERSTATECOUNT
Oct 2014 - Dec 2014U.P70
Oct 2014 - Dec 2014M.P0
Oct 2014 - Dec 2014BIHAR3
Oct 2014 - Dec 2014MAHA50
Oct 2014 - Dec 2014RAJ3

so it was very easy to generate report

then we get data for Jan 2014 to March 2014

QUARTERSTATECOUNT
Oct 2014 - Dec 2014U.P70
Oct 2014 - Dec 2014M.P0
Oct 2014 - Dec 2014BIHAR3
Oct 2014 - Dec 2014MAHA50
Oct 2014 - Dec 2014RAJ3
Jan 2014 - Mar 2014U.P77
Jan 2014 - Mar 2014M.P1
Jan 2014 - Mar 2014BIHAR4
Jan 2014 - Mar 2014MAHA77
Jan 2014 - Mar 2014RAJ5

so we applied filter on quarter manually for generating the report

now we have data like below

QUARTERSTATECOUNT
Oct 2014 - Dec 2014U.P70
Oct 2014 - Dec 2014M.P0
Oct 2014 - Dec 2014BIHAR3
Oct 2014 - Dec 2014MAHA50
Oct 2014 - Dec 2014RAJ3
Jan 2014 - Mar 2014U.P77
Jan 2014 - Mar 2014M.P1
Jan 2014 - Mar 2014BIHAR4
Jan 2014 - Mar 2014MAHA77
Jan 2014 - Mar 2014RAJ5
Apr 2014 - Jun 2014U.P186
Apr 2014 - Jun 2014M.P18
Apr 2014 - Jun 2014BIHAR74
Apr 2014 - Jun 2014MAHA189
Apr 2014 - Jun 2014RAJ68

now as per new requirement they want only this quarter data of Apr 2014 to Jun 2014

Apr 2014 - Jun 2014U.P186
Apr 2014 - Jun 2014M.P18
Apr 2014 - Jun 2014BIHAR74
Apr 2014 - Jun 2014MAHA189
Apr 2014 - Jun 2014RAJ68

and requirement like we have to automate this process . means report should contain only current quarter value.

so my  query is how to achieve this

please suggest

I am using SAP BO 3.1

Thanks in advance

Jeet 

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Jeet,

V_Quarter = ToDate(("01-"+[Quarter]);"dd-MMM-yyyy")

V_Present_Quarter_Data =  [Quarter] where (Quarter([V_Quarter]) = quarter(currentdate()) and year([V_Quarter]) = year(currentdate()))

Former Member
0 Kudos

Hi Jeet,

You can try this-

Create variable

V_Quarter= if Left(<QUARTER>,3)="Jan" then 1 elseif Left(<QUARTER>,3)="Apr" then 2 elseif Left(<QUARTER>,3)="Jul" then 3 else 4

V_Year= Right(<QUARTER>)

V_CurrQuarter=Quarter(CurrentDate())

V_CurrYear=Year (CurrentDate())

Apply filter on report

V_Quarter= V_CurrQuarter and V_Year=V_CurrYear

-Anuj