0

How to get last date of the current month previous year in webi

Oct 17, 2017 at 04:00 PM

52

Former Member

If curr date is 17/10/2017. i need 31/10/2016

AMIT KUMAR
Oct 19, 2017 at 10:11 AM
0

if your bo version is above bi 4.1 sp06 then use below.

=RelativeDate(LastDayOfMonth([curr date]);-12;MonthPeriod)

Show 1 Share
Former Member

Thank you expert.working perfectly

I have another problem hope you can help me out.

I have managed to do an Extended Merge dimension works.

Q1&Q2 (Merged - Result Expected) Q1 Q2

111 111 111

122 122 122

121 121

232 232

But I need to write a single statement formula saying

IF Id both matches in Cust Id and Emp Id then "A" Eg (100,200)

IF Id Only in Cust Id Then "B" Eg(300 to 600)

If Id only in Emp Id Then "C" (700-900)

Former Member Oct 17, 2017 at 05:19 PM
0

Hi Sudarsan,

year=todate(DayNumberOfMonth(Curr_date)+Month(curr_date)+relativedate(year([curr_date]);-1);dd/MM/yyyy)

Prev_date= Relativedate([year];-DayNumberOfMonth([year]))

Let me know if it works or not.

Regards,

Anish

Show 2 Share
Former Member

capture.jpg

Hi Anish,

I am getting an error

capture.jpg (29.1 kB)
Former Member

Hi Sudarsan,

year=todate(DayNumberOfMonth(Curr_date)+Month(curr_date)+Year(relativedate(([curr_date]);-DayNumberOfYear));dd/MM/yyyy)

Prev_date= Relativedate([year];-DayNumberOfMonth([year]))

Please let me know if it works or not.

Thanks,

Anish

AMIT KUMAR
Oct 19, 2017 at 09:44 AM
0

use this.

=LastDayOfMonth([curr date])

Show 3 Share
Former Member

Hi Amit,

Today is 19/10/2017.so I want last date of current month in last year.

31/10/2016

Former Member

Hi,

Attached the screen shot. I have query from 2 DP. one from table(Material)and another from Excel(ITEM)

I am doing an extended merge, so i can get matching as well as unmatching record

The formula i am trying =If IsNull([LWVAL])<>0 Then "A" ElseIf IsNull([V_LastWeek_Data]<>0) Then "B" ElseIf IsNull([LWVAL])<>0 And IsNull([V_LastWeek_Data]<>0) Then "C" Else "NotDefined"

1) 111 contains in both table (Material& Excel)

2)121 only contains in Excel

3)123 only contains in Materialcapture1.jpg

capture1.jpg (21.3 kB)

have you tried with creating LWVAL and V_LastWeek_Data variables as detail variable and associate with merged dimension?