Need a special offer?Find out if your project fits.
+

[OLAP, Accelerator] Can't filter by date selected from date picker

Open
Lukas Navratil asked on February 18, 2022

Hello to Flexmonster,
We noticed an issue when customers were not able to filter by date selected in the date picker (see Datepicker attached), but it works when we select the filtered value in the list of available values (see SelectionFromValues). I compared the MDXs that are sent in Execute request and the filtering part differs. In the first case, the filter clause that it sends is:
({Filter([Sale Date].[Sale Date Id].levels(1), ([Sale Date].[Sale Date Id].CurrentMember.MemberValue<CDate('2022-02-18')))})
In the second case it is:
({[Sale Date].[Sale Date].&[2022-04-18T00:00:00],[Sale Date].[Sale Date].&[2022-02-18T00:00:00]})
The main difference is that the not working query is trying to filter over Sale Date Id, which is not a date field, but that's a FK to the date dimension. In the second case it's filtering correctly on Sale Date itself.
I checked your SSAS sample at https://www.flexmonster.com/demos/js/connect-ssas/ , but there it works. I'm assuming that it's because of different cube structure, I can see in your DiscoverDimensions response:

{
"caption": "Date",
"uniqueName": "[Date]",
"granularityNames": {
"Exchange Rates": "[Date].[Date]",
"Financial Reporting": "[Date].[Date]",
"Internet Customers": "[Date].[Date]",
"Internet Orders": "[Date].[Date]",
"Internet Sales": "[Date].[Date]",
"Reseller Orders": "[Date].[Date]",
"Reseller Sales": "[Date].[Date]",
"Sales Orders": "[Date].[Date]",
"Sales Summary": "[Date].[Date]",
"Sales Targets": "[Date].[Calendar Quarter]"
},
"type": 1,
"description": ""
}

While our dimension definition looks as follows:

{
"caption": "Sale Date",
"uniqueName": "[Sale Date]",
"granularityNames": {
"Booking Box Office": "[Sale Date].[Sale Date Id]",
"Sale Date": "[Sale Date].[Sale Date Id]",
"Session": "[Sale Date].[Sale Date Id]",
"Session Area Seats": "[Sale Date].[Sale Date Id]",
"Session Attribute": "[Sale Date].[Sale Date Id]",
"Session Audio Language": "[Sale Date].[Sale Date Id]",
"Session Subtitles": "[Sale Date].[Sale Date Id]",
"Tab Box Office": "[Sale Date].[Sale Date Id]",
"Tab Concession": "[Sale Date].[Sale Date Id]",
"Tab Payment": "[Sale Date].[Sale Date Id]",
"Transaction Box Office": "[Sale Date].[Sale Date Id]",
"Transaction Box Office Aggregated ByTicketType": "[Sale Date].[Sale Date Id]",
"Transaction Box Office Aggregated Complex": "[Sale Date].[Sale Date Id]",
"Transaction Box Office TPA": "[Sale Date].[Sale Date Id]",
"Transaction Concession": "[Sale Date].[Sale Date Id]",
"Transaction Concession Aggregated Basic": "[Sale Date].[Sale Date Id]",
"Transaction Concession Aggregated Complex": "[Sale Date].[Sale Date Id]",
"Transaction Loyalty Recognition": "[Sale Date].[Sale Date Id]",
"Transaction Payment": "[Sale Date].[Sale Date Id]",
"Voucher Stock": "[Sale Date].[Sale Date Id]"
},
"type": 1
}

I'm assuming that it's taking the value from GranularityNames, which is why in your sample it works, while in ours it doesn't.
If needed, I can provide you some cube where you should be able to reproduce the issue.
Do not hesitate to let me know if you need more information about the issue. FYI, we are using 2.9.4, apologies if it's something that was already fixed in later versions.
Kind Regards,
Lukas Navratil
 
 
 

2 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster February 21, 2022

Hello, Lukas,
 
Thank you for reaching out to us and providing detailed information.

Our team would be grateful if you provided us with some cube where the issue is reproducible. It would help us to continue the investigation.
 
Looking forward to hearing from you.
 
Kind regards, 
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster March 1, 2022

Hello, Lukas,
 
Hope you are doing well.
 
We were wondering if you managed to resolve the described issue.
 
Looking forward to your response.
 
Kind regards, 
Nadia

Please login or Register to Submit Answer