Preset Filtering on MS analysis services

Answered
arnaud desbiens asked on September 27, 2017

Hi,  I was wondering if it is possible to pre set a filter based on a dimension on my cube for my report.
Let's say i have an item fact table and a date dimension. Is it possible to pre set a date filter to show only a certain date and prevent the user to ever change it ? Like having some sort of restriction control over what can be used and what can't be used over my cube ?

3 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster September 29, 2017

Hello, Arnaud,
Thank you for writing. It seems that subquery parameter fits your needs. Please try it for your case. Here is the guide: How to use ‘subquery’ parameter for faster data loading.
We would be grateful for your feedback.
Regards,
Tanya

Public
arnaud desbiens October 4, 2017

It don't fit my needs. I need to prefilter every call with a where clause. The only way i see i could do that is to set the filter myself on the report object like this:
report.slice.reportFilters.push(myFilter)
in the reportchange callback so every single call is filtered with my filter. But when i use setreport(report) the code crash from everywhere... Even tho the report object is legit. I could litterally do
var report = pivot.getReport()
pivot.setReport(report)
and it would crash.. any idea?

Public
Ian Sadovy Ian Sadovy Flexmonster October 5, 2017

Hello Arnaud,
 
Thank you for the answer.
So, in your case, setting report filter may work.
As for the setReport() crash, please check my answer in the other thread.
 
Regards,
Ian

Please login or Register to Submit Answer