MDX "Like"
i new mdx. in sql have wild card search. example. select * products product "aa%".we records product start aa. how same in mdx?
hi rakam,
the easiest way achieve using filter function to filter members caption property following sintax:
select non empty filter([product].[product].members,
left([product].[product].currentmember.properties("caption"),1) = "m") on rows,
[measures].[internet sales amount] on columns
from [adventure works]
but has drawbacks when querying big sized cubes filtering scan every dimension member.
you can otherwise create user hierarchy groups products first letter instead of filtering member can select product group following:
hierarchy: product letter
-----------------------------------
first letter group
product
so can build mdx this:
select [products].[product letter].[first letter group].[a] on rows
measures.[internet sales] on columns
from [adventure works]
bye
SQL Server > SQL Server Analysis Services
Comments
Post a Comment