The ArtOfBI.com Newsletter

Is stupid new and freshly informative on BI and EPM.

Save one little gremlin by not pouring water on its head.

Or, sign up for killer tips, tricks and other BI / EPM goodness delivered right to your inbox.

Hell just do both. Enter your email below.

Oh no what happened?
I already signed up.

BTW, Signing up gets rid of this annoying banner.

Cheers,
Christian & The ArtOfBi.com Team

Tag Archive | "Weeks In a Month"

Tags: Hacks, Time Dimension, Weeks In a Month

OBI Time Dimension Weeks In a Month – Prototype Hack


I was looking to create a formula that required averaging based on the number of week in the given month. As an example Monthly Sales Total / # Weeks In Month.  Since this is a fiscal calendar the weeks are usually standardized and shouldn’t change that often.  So, if the fiscal calendar is on a 4-4-5 or 4-5-4 the logic is rather straightfoward.

I couldn’t make changes to the underlying Calendar dimension table and I couldn’t recall how to do this programmatically in OBI so I went with what I will call a quick prototyping hack.  Here it is below.

CASE  WHEN “Indirect Sales”.DIM_TIME.MONTH_NUMBER IN (3, 6, 9, 12) THEN 5 ELSE 4 END

This worked out perfectly as a place holder as we can see by a quick ad-hoc look at the new calculated measure.

If anyone has the right or clever way of doing this leave a comment.

Posted in Business Intelligence, OBIEEComments (2)

My name is Christian Screen, a Business Intelligence mastermind working with mainly Oracle and Microsoft technologies. The views expressed here are my own and do not reflect the views of Oracle, Microsoft, or my employer. RSS