Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using mdx query to bind charts in month wise, if I am using in the following way

select
{ [Measures].[MetricRatio],[Measures].[Average]} on 0,
{ Filter( LastPeriods(3, [Time].[All Time].[2017].[Quarter 1].[January].[19].parent), true ) } on 1

By using lastperiods with .Parent it was not considering the date. It was getting for the complete january month data.

Actually i should get the data as oct 22 to Jan 19.
Oct : 22 - 31
Nov : 01 - 30
Dec : 01 - 31
Jan : 01 - 19

But it was getting as
Actually i should get the data as oct 22 to Jan 19.
Oct : 01 - 31
Nov : 01 - 30
Dec : 01 - 31
Jan : 01 - 31


If I am removing parent from the mdx query, it was getting october 22 to January 19 which is correct, but displaying in day wise. But I need in monthwise.
select
{ [Measures].[MetricRatio],[Measures].[Average]} on 0,
{ Filter( LastPeriods(3, [Time].[All Time].[2017].[Quarter 1].[January].[19]), true ) } on 1

Please kindly help me, if anybody knows the solution.

What I have tried:

mdx query to display data in monthwise

select
{ [Measures].[MetricRatio],[Measures].[Average]} on 0,
{ Filter( LastPeriods(3, [Time].[All Time].[2017].[Quarter 1].[January].[19].parent), true ) } on 1
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900