Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using ValueLoop with date

Hi all,

I need to generate a dinamic dimension with all date between an range. I try to use the function ValueLoop and this work fine but trasform my date in numeric format.

Example

MinDataRange = 19/07/2010

MaxDataRange= 22/07/2010

valueloop(MinDataRange, MaxDataRange) return 40378, 40379, 40380, 40381.

How to use the valueloop to have a date format output?

I try this command, but does not work fine: Date(ValueLoop(MinDataRange,MaxDataRange), 'DD/MM/YYYY')

Tks.

3 Replies
Not applicable
Author

An alternative, try using a data island for the date. Populate a standalone table with a full calendar of dates. Then you could have a calculated dimension something like:

=if(Date>'15/01/2009' AND Date< '30/01/2009', date(Date))

Or of course use variables instead of hard coded range limits

=if(Date>startdate AND Date<enddate, date(Date))

Not applicable
Author

Thanks Tom,

Your solution is ok for me.

Dp2000

Anonymous
Not applicable
Author

Hi Tom, sorry for waking up this post again. I have made almost exactly the same you mentioned above and chart takes too long to show the data. Have you got better method to improve performance?

Thanks