Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmohammed
Active Contributor
26,369


Hello everyone,

Update as of 6/15/2016 9:40 AM EST:

I found that there is another secret format, to show Week Number of a Year, define the custom format as (ww). You can also use this format in a variable with FormatDate function as =FormatDate([Date];"ww"), it will return the Week Number of the Year.

Did anyone notice the secret custom format (for Date) available/that works in Webi report?

Apparently, we can easily format the Dates to show Quarters as Q1/Q2/Q3/Q4, I just discovered it for myself. I don't know how many people knew about it or since which version is this available or is not a secret anymore, I'm using BO 4.1 SP5.

Step 1:

In a sample report, add Date column twice in a table.



Step 2:

Right click on the 2nd column -> select Format Number -> in Format Number window, select Date/Time -> and from Sample select any one (screenshot has Sep 21, 2004 selected) -> click Custom



Step 3:

Update the Custom Format

 

From (Mmm d', 'yyyy) (or whatever else)



To (qq yyyy) as shown below and click Add to close this window and OK on the Format Number window to close it.



Voila, we unlocked the secret custom format. Now the reports looks like below:



Update to this post as of 10/02/2015 8:53 am (EST)

I just realized that this custom format (for Quarters) has been added in Information Design Tool's feature where we Edit Display Format of an object. Check it out, its great and very helpful.

Update to this post as of 10/14/2015 4:12 pm (EST)

This can be done only in Java Applet mode (and Webi Rich Client) as most of you already know that HTML mode doesn't let us create Custom Formats.

Update to this post as of 12/27/2016 3:48pm (EST):
Another secret format that works, set the custom format as ww, it shows the week number, it can be used in the formula of a variable as =FormatDate([Date];”ww”)

Thanks,
Mahboob Mohammed

22 Comments
Former Member
0 Kudos

Good Option.

wmarcy
Contributor
0 Kudos

Great Webi trick !

You've been added to Webi 4.x tricks : summary for a better visibility. Keep posting !

William

mhmohammed
Active Contributor
0 Kudos

Thanks William.

Former Member
0 Kudos

Nice trick...

mhmohammed
Active Contributor
0 Kudos

Thanks Ram.

mhmohammed
Active Contributor
0 Kudos

Thanks Ravi.

Former Member
0 Kudos

Isn't this only in applet mode? You might want to specify that, since I don't see it in interactive (HTML) mode. You can get to interactive mode by changing your preferences...

mhmohammed
Active Contributor
0 Kudos

Updated the blog post as you suggested.

Thanks Thomas.

Former Member
0 Kudos

Nice trick

mhmohammed
Active Contributor
0 Kudos

Thanks Chitra.

0 Kudos

Nice feature! Very quick and handy. Thanks for sharing.

mhmohammed
Active Contributor
0 Kudos

Thanks Ray.

Former Member
0 Kudos

Thanks for sharing it..!!

mhmohammed
Active Contributor
0 Kudos

Thanks Arun.

former_member201488
Contributor
0 Kudos

Not sure this is new; works in 3.1 SP7; willing to bet this goes back to the introduction of the Timedim function in 3.1SP3, if not before.

Good job raising awareness though, lots of these things remain undocumented until people like you stumble across them :wink:

mhmohammed
Active Contributor
0 Kudos

Hi NMG,

I didn't know it existed already, in 3.1 SP7 (and/or earlier). I've to agree with what you said, "...lots of these things remain undocumented..." :smile:

Thanks,

Mahboob Mohammed

mhmohammed
Active Contributor
0 Kudos

Everyone,

Another secret format that works, set the custom format as ww, it shows the week number, it can be used in the formula of a variable as =FormatDate([Date];"ww").

Thanks,

Mahboob Mohammed

former_member191664
Active Contributor
0 Kudos
Hope someone at SAP would update the "Using Functions, Formulas and Calculations in SAP BusinessObjects Web Intelligence 4.2" documentation on page 39 in section 6.1.1 Custom formats.

Regards,
Jin-Chong
0 Kudos
Thank you, this is so helpful!

One question - do you maybe know why format set in IDT Edit Display Format is displayed differently in Webi? Format I choose is defined as such in Webi, it is just that it is displayed as full date instead of ISO week that I set up in IDT. Thanks in advance!
mhmohammed
Active Contributor
Hi Iva,

Thanks for stopping by at the blog!! You've a valid question, but I think SAP may also have a valid reason to why they have it like that. Simple example, in Webi Formatdate() function can take care of all the different options we see in IDT. Makes sense? Check out this blog for more info on formatdate in Webi.

https://blogs.sap.com/2013/11/21/how-to-use-formulae-to-change-date-and-time-formats-in-webintellige...

In the comments, you'll see a comment by Arijit Das, showing displaying time in different formats.

Thanks,
Mahboob Mohammed
Former Member
0 Kudos
Hello

The week function is not perfect, watch out for this bug in Webi 4.1 SP5:

FormatDate(ToDate("1/01/2017";"dd/MM/yyyy"); "ww") = 52

FormatDate(ToDate("1/01/2017";"dd/MM/yyyy"); "yyyy-ww") = 2017-52

 

The week calculation is also inconsistent with the weeks displayed in MS Office:

mhmohammed
Active Contributor
0 Kudos
Thanks for the info Puneet!!
Labels in this area