0

I am designing a dashboard with Datazen. I need to define data view with parameters. Where statement of mdx query as follows

where (
 STRTOMEMBER("[X].[X NAME].[" + {{ @XParam }} + "]"), 
 STRTOMEMBER("[Y].[Y NAME].[" + {{ @YParam}} + "]")
)

and I defined @XParam and @YParam. My query works when I go next step and get result as expected. But problem occurs when data view added from Datazen Designer to build charts. How can I solve this problem?

Exception: System.ArgumentException: Value does not fall within the expected range. at Windows.UI.Xaml.Data.Binding.put_Path(PropertyPath value) at ComponentArt.WinRT.DataVisualization.DataGrids.GridView.GenerateColumn(String name, String bindingPath, Type type)

Jon B
  • 875
  • 7
  • 18
kparkin
  • 325
  • 3
  • 7
  • 20

1 Answers1

1

Try this:

where (
 STRTOMEMBER("[X].[X NAME].[" + '{{ @XParam }}' + "]"), 
 STRTOMEMBER("[Y].[Y NAME].[" + '{{ @YParam }}' + "]")
)

You missed single quotes and the last space in the second param.

Bruce P
  • 19,995
  • 8
  • 63
  • 73
lachicazul
  • 73
  • 1
  • 8
  • what will happen is @XParam is null? is there anyway to allow null to be used as @XParam? – whytheq Apr 05 '16 at 13:42
  • @whytheg null check is required, something like " IIF( ISEMPTY ({{ @X }} ), "", {{ @X }} ) " should work. – kparkin Jul 26 '16 at 11:56