ssas - The Axis0 function expects a tuple set expression for the argument -


i want invoices distinct count of sales on march. got mdx query.

my mdx query:

select  distinctcount([measures].[sales #]) on columns, --[measures].[sales #] on columns, non empty ([customer].[store group].[store group]) on rows ( select  {     [calendar].[month].[march 2015] } on columns [f1_salesbi]) 

but got following error, whenever tried executing this.

executing query ... axis0 function expects tuple set expression  argument. string or numeric expression used. execution complete 

here definition msdn: https://msdn.microsoft.com/en-us/library/ms145519.aspx

syntax:

distinctcount(set_expression)

you're doing when use measures argument:

distinctcount(numeric_expression) 

something following should run ok:

with    set [myset]      [customer].[store group].[store group] * {[measures].[sales #]}    member [measures].[setdistcount]      distinctcount([myset])  select    {     [measures].[setdistcount]    ,[measures].[sales #]   } on 0  ,non empty      [customer].[store group].[store group] on 1  (   select      {[calendar].[month].[march 2015]} on 0   [f1_salesbi] ); 

to return number of invoices month try following:

with    set [myset]      {[calendar].[month].[march 2015]}  * {[measures].[sales #]}    member [measures].[setdistcount]      distinctcount([myset])  select    {     [measures].[setdistcount]   } on 0 [f1_salesbi]; 

if above returns 1 try inspecting set via script:

select    {} on 0,   {[calendar].[month].[march 2015]}  * {[measures].[sales #]}  on 0 [f1_salesbi]; 

does return 1 member?

how (without set braces around measure)?:

select    {} on 0,   {[calendar].[month].[march 2015]}  * [measures].[sales #]  on 0 [f1_salesbi]; 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -