7 Replies Latest reply: Feb 23, 2012 2:57 PM by Chris Cahoon

Minimum dimension

I am having a problem finding the minimum dimension within my chart.  Week is my dimension and I am creating a trendline based on the week.  The lowest possible value for week is the week start of the current week and the max possible value for week is 78 weeks from this week.  My week dimension is always the start of the week (monday).

If the week is equal to the weekstart of today, then that is week1 and my calculation works fine.  However sometimes I only have data for week 3, 4, and 5 but not week1.  If this is the case then I need to do A for week 3 and B for the rest of the weeks.  My ultimate goal is to do A for the lowest week in my data and B for the rest.  Here are a few calculations I tried.  Any help would be much appreciated.

Works only if I have data for week 1:

if(Week = WeekStart(Today()), A, B )

Does not work, always does A and never does B.  It must always be matching the same week to itself.

if(Week = min(Week), A, B )

• Minimum dimension

What type of data is returned for your Week field?

• Minimum dimension

The week is in date format, mm/dd/yyyy

• Minimum dimension

Try this:

if(Week=min(Total Week),A,B)

• Minimum dimension

Using min(TOTAL week) seems to give the same results as min(week).

• Minimum dimension

Chris,

min(TOTAL Week) should return the minimum Week of all Week values in your dimension (Week is still your dimension, right?

While min(Week) will return the min(Week) for all Weeks in the subset created by the dimension value grouping (if you use Week as dimension, there is only one distinct value, the current Week of that line, so min(Week) = Week for all lines).

Could you post a small sample here?

Stefan

• Minimum dimension

min(TOTAL week) ended up working, thanks guys.  My testing was showing incorrectly for a minute but I realized it was a data issue.

• Minimum dimension

Try

if(Week = min(TOTAL Week),A,B)