Switching measure based on date

Dear community,

I have a problem where I would need your help.

I am showing in a dashboard the issue history for our customer bugs.

So far so good. But now I want to change the measure from “issue history” to a calculated forecast for all dates > today.

Is it possible to achieve this with eazyBI?

Thanks!
Stefan

Hi @StefanW

Welcome to the Community! :slight_smile:

Sure thing!
There are several ways how to combine several measures into one measure. You can use either the CASE statement or IIf statement.
For example, you can define a new calculated measure in the Measures dimension with the following formula that uses the IIf statement and the DateCompare function to compare the date in each report row to the date of today:

IIf(
  -- compares the time member in rows to today
  DateCompare([Time].CurrentHierarchyMember.StartDate,"today") < 1,
  -- if the time member in rows is today or previous days then history
  [Measures].[Issues history],
  -- if the time member in rows is after today, then custom formula
  [Measures].[Custom formula]
)

You can check out our “Forecast and Management” Demo dashboard for different calculated forecasts, if you need an example: Forecast and Management - Jira Demo - eazyBI

​Best regards,
​Nauris / eazyBI support