cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rcharan Regular Visitor
Regular Visitor

Rolling 12 Months and Prior Year Rolling 12 Months in the same visual

Hi All,

 

I am trying to show Current year rolling 12 month and Prior year rolling 12 month measures as two lines on the same chart. When I put them in the Line Visual using Month (without Year) on the Axis it starts from Jan as expected and when I use Month&Year I get lines one after another like below. I have seen a similar thread related to this topic but didn't find any solution, Please suggest if there is any work around.

 

Thanks in advance

 

Using Month&Year.PNGUsing Month & YearUsing Month Only.PNGUsing Month OnlyActual numbers.PNGActual numbersExpected Output.PNGExpected Output

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Rolling 12 Months and Prior Year Rolling 12 Months in the same visual

Hi @rcharan ,

What is your measure for Prior year rolling 12 month ?

Based on my research, your measure should achieve below data:

1.PNG

You could also download my pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Super User
Super User

Re: Rolling 12 Months and Prior Year Rolling 12 Months in the same visual

@rcharan seems like your measures are not workign as expected. In the table it should show previous year rolling measure next to current year rolling and that is the case you are not getting expected result.





Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




Community Support Team
Community Support Team

Re: Rolling 12 Months and Prior Year Rolling 12 Months in the same visual

Hi @rcharan ,

What is your measure for Prior year rolling 12 month ?

Based on my research, your measure should achieve below data:

1.PNG

You could also download my pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: Rolling 12 Months and Prior Year Rolling 12 Months in the same visual

Hi @rcharan ,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered to close this topic?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rcharan Regular Visitor
Regular Visitor

Re: Rolling 12 Months and Prior Year Rolling 12 Months in the same visual

Hi @v-danhe-msft ,

 

Sorry for the late response. I see this is marked as solved but I would still like to post my measures which didn't give me what I want:

 

Rolling 12 Months = 

VAR currDate =
MAX (vw_DIM_Month[FirstofEveryMonth] )
RETURN
CALCULATE (
[Total DAR],
FILTER (
ALLSELECTED ( vw_DIM_Month ),
[FirstofEveryMonth]
> DATE ( YEAR ( currDate )-1, MONTH ( currDate ), DAY ( currDate ) )
&& [FirstofEveryMonth] <= currDate
)
)
 
Prior Year Rolling 12 Months =
VAR currDate =
MAX ( vw_DIM_Month[FirstofEveryMonth] )
RETURN
CALCULATE (
[Total DAR],
FILTER (
ALLSELECTED ( vw_DIM_Month ),
[FirstofEveryMonth]
> DATE( YEAR ( currDate ) - 2, MONTH ( currDate ), DAY ( currDate ) )
&& [FirstofEveryMonth]
<= DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
)
)
 
Thanks