Finding minimum value in date hierarchy

H

Hans Riis

I use dropdown menus in my HTML pages to make it easy for the user to
select a certain time period in a chart. I need a way to make sure
that I don't reference a date that doesn't exist or else I get
"Subscript out of range".

Depending on the length of the time period I use year-month-day or
only year-month. How can I find the minimum value in the date
hierarchy to make sure I only reference valid dates? I'm using
VBScript and my data comes from an Analysis Services cube.

Regards, Hans Riis
 
M

Michael Weiss

Hans,
Have you thought about using regular ADO to open a
recordset over your cube source data (not the aggregated
data in AS) and doing a "SELECT MIN(datefield) FROM
tablename" statement? It's probably not the solution you
were hoping for but it should work...also I suppose you
could open an MDX cellset over the olap data and get to
the minimum date that way...
hth,
Michael
 
H

Hans Riis

Thanks Michael.

It's worth a try. I'm still hoping to be able to extract the values
straight from the chart's internal pivottable but if it doesn't work
I'll try your solution.

Regards, Hans
 
M

Michael Weiss

Hans,
If you figure out how to do it, will you post it here? I
would be interested in the solution...
Thanks,
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top