Hi All,
I have a column called Week/year which displays data as week of the year. eg: β201323β
So 2013 is year and 23 is the week of the year. I need to show it as Date. My backend is a Bex Query and I am using BI Launcpad using BICS to connect with BW.
I tried to use ToDate function in webi, but it does not recognise β201323β as Date.
I want it to show as the weekend Date, that is Saturday in Webi.
Appreciate the input!
Hi,
Iβll assume that you canβt just pull in the date from your data source (not sure wih BEX limitations). If itβs a requirement, then it needs to be in your data source.
One option would be to add another data provider to your report that had your year and weeks tied to Saturday (or other) dates for use in the report to display.
Otherwise you may need to consider an extensive somewhat crazy variable something like this;
[list]=
If(Substr([Your Date Field];5;2)=β01β;β1/5/2013β;
If(Substr([Your Date Field];5;2)=β02β;β1/12/2013β;
If(Substr([Your Date Field];5;2)=β03β;β1/19/2013β;
If(Substr([Your Date Field];5;2)=β04β;β1/26/2013β))))[/list]
note this code only works for the first 4 weeks of 2013.
I am very new to Web Intelligence and still mastering the basics. I have no formal technical training and all of my experience with report writing has been in excel. I am still figuring out how to translate what I know about pivot tables, vlookups and excelβs syntax into WIXI. I have absolutely no database experience or with writing queries in SQL but I love having the opportunity to learn.
I needed to modify Marekβs solution in order to complete one of my first projects in WIXI. Perhaps someone can benefit from this (unlikely) or can provide a more elegant solution (more likely).
I have a report that runs from Friday to Thursday of the following week and is dated that Friday. I started by creating a new variable that uses the Day Name to move Friday, Saturday and Sunday to the next week:
=If([Open Time (Day Name)]="Friday" Or [Open Time (Day Name)]="Saturday" Or [Open Time (Day Name)]="Sunday";ToNumber([Open Time (Week Nr)])+1;ToNumber([Open Time (Week Nr)]))
Then I switched the second part of Marekβs formula to point to the new variable:
Since 2013 began on a Tuesday, I adjusted the relative date to -16 because I needed 1/1 through 1/3 to count as the first week of the year but display as the week beginning 12/28/12.
I consider this a good-enough-for-now solution but I have already found a problem: the formula doesnβt work for multiple years.