MDX same measure hierarchy on row -
i'm new mdx. i've been strugglin real hard on one. i'm trying compare same measure on 2 different week. have date dimension , total measure. want displayed following:
monday tuesday wednesday thursday friday saturday sunday first week 120 54.21 128.87 1298 121 213 176 second week 98 67.21 62.32 1276 432 98 127
my query far looks this:
member [measures].[firstweek] ([measures].[total], {[dim date].[date id].&[20160429]:[dim date].[date id].&[20160504]}) member [measures].[secondweek] ([measures].[total], {[dim date].[date id].&[20160505]:[dim date].[date id].&[20160512]}) select {[dim date].[week day].[week day]} on columns, ([measures].[firstweek] , [measures].[secondweek]) on rows [example] (...)
the equivalent in sql simple somehow in mdx won't let me use twice same measure if it's based on different dimension time. hint appreciated !
this wrong:
([measures].[total], {[dim date].[date id].&[20160429]:[dim date].[date id].&[20160504]})
you're using set plus measure no aggregation. read my article more details. try:
aggregate({[dim date].[date id].&[20160429]:[dim date].[date id].&[20160504]},[measures].[total])
Comments
Post a Comment