Skip to main content

I have a metric dimensioned by Day and Project. I want to offset back a certain number of Days based on another Metrics Input (Project Length). The Project_Length metric is an integer metric dimensioned by Project only. Is there a way to dynamically offset the number of days back in a SELECT statement based on an input such that this?

 

 

 

I have several projects that start N number of workdays before the end of the month, so I am trying to calculate their start date for each month based on the number of days they take (Project_Length) 

Hi,

 

You can do this calculation (Day - Project Length) in a metric and use it in the select


Hi ​@Nathan Can you explain or provide an example of how I would do this calculation in another metric? Day is a dimension so I dont see how I could do this calculation outside of a select


@LAS Can you modify your formula as below and see if it works?

if(Day.First_Workday, DayDDay.’Day of  Week’.Working_Days]nAdd: Project]Pselect: Day - Project_Length]


is used to add dimension of Project to your metric


@Min Li Bright Point Thanks for this but unfortunately the Select can only subtract using a metric if the metric the formula is written is one dimensional


you can do the metric by Day and Project, do Day - Project Length and select on that.

 

You can also do SHIFT() within your select but I try to avoid putting functions within modifiers


Reply