MDX Date - Format

Hi,

When I execute the below MDX Query it does not return any values,

SELECT {[Measures].[Tag Count]} ON COLUMNS, non empty { [Tag].[Changed Date].&[2015-01-20T07:22:57.876667]  } ON  ROWS  FROM [Team System]

even though the value of the date ([2015-01-20T07:22:57.876667])exists in the result set below

SELECT {[Measures].[Tag Count]} ON COLUMNS, non empty { [Tag].[Changed Date].Children  } ON  ROWS  FROM [Team System]

Could you please guide me on how to, if something is wrong in the syntax with the date?



  • Edited by Sridz 44 minutes ago
February 19th, 2015 10:31am

Hi Sridz,

According to your description, you can't find the [2015-01-20T07:22:57] in your result set. Right?

In this scenario, since you use non empty, and you mentioned the this member doesn't exist in your second query, it means this member has null value on [Measures].[Tag Count]. You can remove non empty to check if this date is existing in your dimension. For more information about non empty, please refer to the link below:

MDX : Non Empty v/s NonEmpty

If you have any question, please feel free to ask.

Regards,

Free Windows Admin Tool Kit Click here and download it now
February 20th, 2015 11:48am

Hi Simon,

Thanks for your reply.

Sorry, the date field format when I drag and drop the value from the attribute is as below.

[Tag Definition].[Changed Date].&[2015-01-20T07:22:57.876667]

 I've tried removing non empty and checked. The query still does not return any values.

However, when I changed the date format by removing the milliseconds while inserting the data to the cube. This works fine, and I've checked other date fields in the product and no field has a milliseconds value.

[Tag Definition].[Changed Date].&[2015-01-20T07:22:57]

Is milliseconds not accepted?

Regards,
Sridhar.

February 23rd, 2015 5:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics