Skip to Content

While trying to create a nice dashboard for the revenue per sales person, it occured to me there is no way to filter the dashboard for example for the current quarter. So first I created a specific dashboard per quarter, but that meant that every new quarter you needed to change the dashboard, or you look at old data.

Working this out I was thinking about creating a ‘calculated measure’ like: if(Invoice Quarter = Current Quarter, Revenue, 0)

Via the pre delivered attribute DIM_REFDATE it was pretty easy to find out the Quarter for the Invoice. The current quarter was more difficult, because there is no function like Quarter(now()) in the calculated measures. There is a function component which can extract a year, month, day, hour and second from a timestamp.

I used this component to extract the current quarter like this:

if(component(now(),2)<=3,1,if(component(now(),2)<=6,2,if(component(now(),2)<=9,3,if(component(now(),2)<=12,4,0))))

where component(now(),2) extracts the number of the month, f.e. Februari=2

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply