Problem using Date fields with SSAS tabular and an XMLA endpoint

Answered
Brian Rogers asked on May 23, 2024

We are having problems with Date fields in Flexmonster and SSAS Tabular. Flexmonster only recognizes them as Text Labels not Date fields, reduce our ability to filter by this our data set in a meaning full way. We have our own XMLA proxy (similar to msmdpump.dll) which we need to support our app. We would rather not use your accelerator, how can we get Date fields to work in Flexmonster?

Using our Proxy and Excel, Date fields work correctly in Excel pivot tables, so I don't see why they cannot be made to work with the standard XMLA endpoint?

Flexmonster version 2.9.77

Please Advise.

Thanks,

Brian

8 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 23, 2024

Hello, Brian!

Thank you for reaching out to us.

We have resolved this issue within Flexmonster Accelerator and recommend using it instead of a direct XMLA connection. This approach is more recommended due to its benefits, such as using a lighter protocol suited for client-server information exchange and designed specifically for Flexmonster. This improves the overall performance of our component.
The Accelerator supports XMLA connection, making this solution easy to implement.

Please let us know if using Flexmonster Accelerator is viable for you.

Best Regards,
Maksym

Public
Brian Rogers May 24, 2024

Hi Maksym,

Thanks for your response. We would prefer to continue to use our XMLA endpoint as it supports a number of features required by our customers, such as logging queries and results, handling some security issues etc. We also use direct connections to Azure AS and are not in a position to implement any middleware, so Flexmonster Accelerator is not really a viable solution for us at the moment.

Our proxy works fine with dates when used in excel, surely you can recognize date fields when delivered through the XMLA endpoint.

Thanks,

Brian

 

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 27, 2024

Hello, Brian!

Thank you for clarifying your use case.

Flexmonster supports certain date types and date filters with Analysis Services XMLA, as shown in this example: https://jsfiddle.net/flexmonster/bdrfwzk7/. We suggest looking through the network tab to see the returned dates and, in particular, checking the LEVEL_TYPE values within the response to the MDSCHEMA_LEVELS request. This parameter shows the date type used on our server, and it is currently supported.
Since you've mentioned using your custom XMLA proxy, modifying it to align with currently supported data types should be possible.

Please let us know if modifying a date type on your XMLA endpoint is viable for you.

Best Regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 13, 2024

Hello, Brian!

Hope you are doing well.
We are wondering if you resolved the issue with date fields not being recognized while connecting via XMLA.
Please let us know if you need any further assistance.

Best Regards,
Maksym

Public
Yosef June 18, 2024

Hi Maksym,

Thanks for following up.

I'm working on this issue as well.

Can you give us more information on the format type that needs to be assigned to the [Date] fields from the XMLA handler between SSAS and Flexmonster?

Here's what I can see from the msmdpump request in the demo you linked:

<row>
<CATALOG_NAME>Adventure Works DW Standard Edition</CATALOG_NAME>
<CUBE_NAME>Adventure Works</CUBE_NAME>
<DIMENSION_UNIQUE_NAME>[Date]</DIMENSION_UNIQUE_NAME>
<HIERARCHY_UNIQUE_NAME>[Date].[Date]</HIERARCHY_UNIQUE_NAME>
<LEVEL_NAME>(All)</LEVEL_NAME>
<LEVEL_UNIQUE_NAME>[Date].[Date].[(All)]</LEVEL_UNIQUE_NAME>
<LEVEL_CAPTION>(All)</LEVEL_CAPTION>
<LEVEL_NUMBER>0</LEVEL_NUMBER>
<LEVEL_CARDINALITY>1</LEVEL_CARDINALITY>
<LEVEL_TYPE>1</LEVEL_TYPE>
<DESCRIPTION/>
<CUSTOM_ROLLUP_SETTINGS>0</CUSTOM_ROLLUP_SETTINGS>
<LEVEL_UNIQUE_SETTINGS>0</LEVEL_UNIQUE_SETTINGS>
<LEVEL_IS_VISIBLE>true</LEVEL_IS_VISIBLE>
<LEVEL_ORDERING_PROPERTY>(All)</LEVEL_ORDERING_PROPERTY>
<LEVEL_DBTYPE>3</LEVEL_DBTYPE>
<LEVEL_KEY_CARDINALITY>1</LEVEL_KEY_CARDINALITY>
<LEVEL_ORIGIN>6</LEVEL_ORIGIN>
</row>

Our handler also returns a similar result on our cube:

<row>
<CATALOG_NAME>BIMS</CATALOG_NAME>
<CUBE_NAME>Model</CUBE_NAME>
<DIMENSION_UNIQUE_NAME>[Date]</DIMENSION_UNIQUE_NAME>
<HIERARCHY_UNIQUE_NAME>[Date].[Date]</HIERARCHY_UNIQUE_NAME>
<LEVEL_NAME>(All)</LEVEL_NAME>
<LEVEL_UNIQUE_NAME>[Date].[Date].[(All)]</LEVEL_UNIQUE_NAME>
<LEVEL_CAPTION>(All)</LEVEL_CAPTION>
<LEVEL_NUMBER>0</LEVEL_NUMBER>
<LEVEL_CARDINALITY>0</LEVEL_CARDINALITY>
<LEVEL_TYPE>1</LEVEL_TYPE>
<CUSTOM_ROLLUP_SETTINGS>0</CUSTOM_ROLLUP_SETTINGS>
<LEVEL_UNIQUE_SETTINGS>0</LEVEL_UNIQUE_SETTINGS>
<LEVEL_IS_VISIBLE>true</LEVEL_IS_VISIBLE>
<LEVEL_ORDERING_PROPERTY>(All)</LEVEL_ORDERING_PROPERTY>
<LEVEL_DBTYPE>3</LEVEL_DBTYPE>
<LEVEL_KEY_CARDINALITY>1</LEVEL_KEY_CARDINALITY>
<LEVEL_ORIGIN>2</LEVEL_ORIGIN>
</row>

Also I noticed in the documentation it says "For Microsoft Analysis Services, Flexmonster uses date formatting configured inside the cube."

Our Date table has the following Date column configured in the cube and it's similar with the same datatype as the AdventureWorks demo you linked:

{
"name": "Date",
"dataType": "dateTime",
"sourceColumn": "Date",
"formatString": "General Date",
"sourceProviderType": "DBDate"
}

I can see a difference in the value format in the XMLA handler response - could this make a difference?
DEMO

<Member Hierarchy="[Date].[Date]">
<UName>[Date].[Date].&amp;[20110124]</UName>
<Caption>January 24, 2011</Caption>
<LName>[Date].[Date].[Date]</LName>
<LNum>1</LNum>
<DisplayInfo>131072</DisplayInfo>
<PARENT_UNIQUE_NAME>[Date].[Date].[All Periods]</PARENT_UNIQUE_NAME>
<HIERARCHY_UNIQUE_NAME>[Date].[Date]</HIERARCHY_UNIQUE_NAME>
<MEMBER_TYPE>1</MEMBER_TYPE>
</Member>

OURS

<Member Hierarchy="[Date].[Date]">
<UName>[Date].[Date].&amp;[2014-01-01T00:00:00]</UName>
<Caption>1/1/2014</Caption>
<LName>[Date].[Date].[Date]</LName>
<LNum>1</LNum>
<DisplayInfo>0</DisplayInfo>
<PARENT_UNIQUE_NAME>[Date].[Date].[All]</PARENT_UNIQUE_NAME>
<HIERARCHY_UNIQUE_NAME>[Date].[Date]</HIERARCHY_UNIQUE_NAME>
<MEMBER_TYPE>1</MEMBER_TYPE>
</Member>
Public
Maksym Diachenko Maksym Diachenko Flexmonster June 19, 2024

Hello, Yosef!

Thank you for sharing these details with us.

Please note that the <LEVEL_TYPE>1</LEVEL_TYPE> is a generic type for each top hierarchy level with LEVEL_NAME set to "(All)" and the LEVEL_NUMBER set to "0". The actual LEVEL_TYPE from level with dates containing dates defined in data returned from our XMLA endpoint is 4289, with the LEVEL_NUMBER "1":

<CATALOG_NAME>Adventure Works DW Standard Edition</CATALOG_NAME>
<CUBE_NAME>Adventure Works</CUBE_NAME>
<DIMENSION_UNIQUE_NAME>[Date]</DIMENSION_UNIQUE_NAME>
<HIERARCHY_UNIQUE_NAME>[Date].[Date]</HIERARCHY_UNIQUE_NAME>
<LEVEL_NAME>Date</LEVEL_NAME>
<LEVEL_UNIQUE_NAME>[Date].[Date].[Date]</LEVEL_UNIQUE_NAME>
<LEVEL_CAPTION>Date</LEVEL_CAPTION>
<LEVEL_NUMBER>1</LEVEL_NUMBER>
<LEVEL_CARDINALITY>3653</LEVEL_CARDINALITY>
<LEVEL_TYPE>4289</LEVEL_TYPE>
<DESCRIPTION />
<CUSTOM_ROLLUP_SETTINGS>0</CUSTOM_ROLLUP_SETTINGS>
<LEVEL_UNIQUE_SETTINGS>0</LEVEL_UNIQUE_SETTINGS>
<LEVEL_IS_VISIBLE>true</LEVEL_IS_VISIBLE>
<LEVEL_ORDERING_PROPERTY>Date</LEVEL_ORDERING_PROPERTY>
<LEVEL_DBTYPE>3</LEVEL_DBTYPE>
<LEVEL_NAME_SQL_COLUMN_NAME>NAME( [$Date].[Date] )</LEVEL_NAME_SQL_COLUMN_NAME>
<LEVEL_KEY_SQL_COLUMN_NAME>KEY( [$Date].[Date] )</LEVEL_KEY_SQL_COLUMN_NAME>
<LEVEL_UNIQUE_NAME_SQL_COLUMN_NAME>UNIQUENAME( [$Date].[Date] )
</LEVEL_UNIQUE_NAME_SQL_COLUMN_NAME>
<LEVEL_ATTRIBUTE_HIERARCHY_NAME>Date</LEVEL_ATTRIBUTE_HIERARCHY_NAME>
<LEVEL_KEY_CARDINALITY>1</LEVEL_KEY_CARDINALITY>
<LEVEL_ORIGIN>6</LEVEL_ORIGIN>

We suggest setting the same type for dates returned from your XMLA endpoint.

Please let us know if this solution works for you.

Best Regards,
Maksym

Public
Yosef June 21, 2024

Thank you Maksym,

This got us thinking.

As per your documentation which said that the date format needs to be configured on the cube, we found there was a property on the cube's Date table to set for Flexmonster to recognize it as a date. 

{
"create": {
"parentObject": {
"database": "AventureWorksTabular"
},
"table": {
"name": "Date",
"dataCategory": "Time",

Maybe this could be modified on the XMLA handler as you mentioned too, we haven't tried. 

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 24, 2024

Hello, Yosef!

Thank you for your reply.
We look forward to hearing your reply regarding whether changing the LEVEL_TYPE helped to resolve the issue.

Best Regards,
Maksym

Please login or Register to Submit Answer