EazyBI formula: Is there any way to CEIL values?

Hi guys,

I am trying to get values like the following:
1~5: 1
6~10: 2
11~15: 3
16~20: 4

Is there a way to get these outputs?

I tried to find something like Ceiling, but couldn’t find any.

Other alternative ways would be also appreciated.

Thank you!

Hi, @Kyung_Park

Welcom to the eazyBI community.

I hope we are on the same page. The example makes me think you want to divide the values by 5, and then the result is “rounded up” using Ceil.

Our MDX has no Ceil, but what we can’t round up, we can round down :slight_smile:

Please consider using Int instead. Int rounds the values. Please read more here: Int

The mathematical formula that is something like the Ceiling in MDX should look something like this:

 Int(
 (<reference to your value>-1)
 /
 5)+1

Kindly,
Ilze

1 Like

Hi @ilze.mezite

Thank you so much for your solution!

It makes sense to use “Int” for rounding down instead of rounding up!

I appreciate your help. :slight_smile:

Sincerely,
Kyung