# Trivial OR function

**URL:** <https://community.eazybi.com/t/trivial-or-function/1933>\
**Category:** Questions & Answers\
**Tags:** calculatedmembers\
**Created:** [March 27, 2019, 10:51am UTC](https://community.eazybi.com/t/trivial-or-function/1933 "2019-03-27T10:51:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gawlo](https://community.eazybi.com/user_avatar/community.eazybi.com/gawlo/32/1173_2.png) [@gawlo](https://community.eazybi.com/u/gawlo)\
**Post date:** [March 27, 2019, 10:51am UTC](https://community.eazybi.com/t/trivial-or-function/1933/1 "2019-03-27T10:51:26Z")

</div>

Hello all,  
I’m quite new at EazyBI.

I thought it will be easy one, but I was wrong.  
I created new calculated field in “Measures”. Just counting, if SLA was completed and code has two parts.

First is:  
([Time to resolution State].[Completed],  
[Time to resolution Breached].[Not breached])

And second:  
([Time to resolution State].[Paused],  
[Measures].[Issues resolved])

Both parts work great separetly. but I need to do first OR second part, not both at the same time. And I absolutly can’t find solution, how to add trivial OR between it.

Thank you very much for any answers. I am lost.  
Filip

---

<div class="post-metadata">

**Author:** ![lauma.cirule](https://community.eazybi.com/user_avatar/community.eazybi.com/lauma.cirule/32/8830_2.png) [@lauma.cirule](https://community.eazybi.com/u/lauma.cirule)\
**Post date:** [April 1, 2019, 2:12pm UTC](https://community.eazybi.com/t/trivial-or-function/1933/2 "2019-04-01T14:12:58Z")

</div>

Hi Filip,

If you wish to give the result of one or the other being true, you could simply add them together (note that I added a Measure in the first tuple as well - measure is a treasure and it is best to always use it to know what numbers you are counting in the filtered context)

```
([Measures].[Issues resolved], 
  [Time to resolution State].[Completed],
  [Time to resolution Breached].[Not breached])
+
([Measures].[Issues resolved],
  [Time to resolution State].[Paused])

```

Or you can use the CASE WHEN conditions are true

```
CASE WHEN 
([Measures].[Issues resolved], 
      [Time to resolution State].[Completed],
      [Time to resolution Breached].[Not breached]) > 0 
THEN ...
WHEN ([Measures].[Issues resolved],
      [Time to resolution State].[Paused]) > 0
THEN ...
ELSE ...
END

```

Let me know if I missed something and you have some further questions!  
Kind regards,

---

<div class="post-metadata">

**Author:** ![gawlo](https://community.eazybi.com/user_avatar/community.eazybi.com/gawlo/32/1173_2.png) [@gawlo](https://community.eazybi.com/u/gawlo)\
**Post date:** [April 11, 2019, 3:38pm UTC](https://community.eazybi.com/t/trivial-or-function/1933/3 "2019-04-11T15:38:43Z")

</div>

Hi Lauma,

Thank you very much for respond. It works like a charm 🙂  
It was just “+”. I thought “+” is something like “AND”, not “OR”, so I never tried it.  
I tried CASE, but the resulting sum was not working well.

I have one more question, but maybe little more complicated.  
I have report, where are columns “created date”, “resolution date”, “accepted date”.  
Dimmension “Time” is used for period filter (for example previous month “March”).  
And we need to filtr only “accepted date”, but dimmension “Time” considers all time fields always (So the filtr for accepted tickets at March, shows not only accepted tickets, but also tickect which were created at that month or resolved or somehow updated).

Is there a way to set Time dimmension to work only with specific fields?

I hope I wrote it understandable.  
Again thank you very much for everything.

Best regards,  
Filip

---

<div class="post-metadata">

**Author:** ![lauma.cirule](https://community.eazybi.com/user_avatar/community.eazybi.com/lauma.cirule/32/8830_2.png) [@lauma.cirule](https://community.eazybi.com/u/lauma.cirule)\
**Post date:** [May 8, 2019, 11:30am UTC](https://community.eazybi.com/t/trivial-or-function/1933/4 "2019-05-08T11:30:42Z")

</div>

Hi Filip,

I missed this reply/follow up question from you, I am sorry about that!  
I see you did the right thing by re-posting it in a [new topic](https://community.eazybi.com/t/specific-date-filter/2132). I or my colleagues will get to it there!

Lauma / [support@eazybi.com](mailto:support@eazybi.com)
