4 Replies Latest reply: Oct 3, 2017 6:38 AM by naveen kumar

# how to get min date when a fiscal year or fiscal year pluse quarter is selected

Hello All,

From the above sample data for a particular material ,when either a fiscal year(2017) or fiscal year pulse quarter one(Q1) is selected i need to bring PRICE_MAT =1.75(VALIDFROM=4/2/2016)  and

If Fiscal year and Quarter Three(Q3) is selected then i need to bring PRICE_MAT=1.8 which is having max VALIDTO(12/31/9999) for that particular material ...

How to write a expression to achieve the above requirement ,any suggestions please

Thanks

• ###### Re: how to get min date when a fiscal year or fiscal year pluse quarter is selected

Try

Sum({ <VALIDFROM = {"\$(=Max(VALIDFROM))"}>}PRICE_MAT)

• ###### Re: how to get min date when a fiscal year or fiscal year pluse quarter is selected

Thanks for your reply ,but the above expression wont full fill my requirement ...

• ###### Re: how to get min date when a fiscal year or fiscal year pluse quarter is selected

How do you calculate fiscal_year and Qurter??

Try below

Sum({ <VALIDFROM = {"\$(=Min(VALIDFROM))"},VALIDTO = {"\$(=Max(VALIDTO ))"}>}PRICE_MAT)

regards,

• ###### Re: how to get min date when a fiscal year or fiscal year pluse quarter is selected

HI,Fiscal year i am getting from data source itself ,for quarter i wrote this

If(Right(CALMONTH,2)>=04 and Right(CALMONTH,2)<=06,'Q1',

If(Right(CALMONTH,2)>=07 and Right(CALMONTH,2)<=09,'Q2',

If(Right(CALMONTH,2)>=10 and Right(CALMONTH,2)<=12,'Q3','Q4'))) as QUARTER,