Moving Average in Stacked column chart

Is there any reason why the have to be in the same visual?

You can’t create difference visuals? One using the dates and the other for the summary information?

That would really simplify this and be more suitable from a Power BI perspective.

Here’s how to create a chart for just the summary.

You need to create a supporting table that assists with the visual. Maybe you’ll get some good ideas from this mock up.

First you need to create a simple table like the below which will be used as the axis

Have it sit in the model out to the side

Now we have the axis setup

image

Then create a measure using this technique

Moving Average Results = 
VAR MA = SELECTEDVALUE( 'Moving Average Axis'[Moving Average] )

RETURN
SWITCH( TRUE(),
    MA = "30 Day MA", [Sales 30D MA],
    MA = "360 Day MA", [Sales 360D MA],
BLANK() )

Add it to the table

image

Then turn to a visualization

image

So this is really the technique to use here

See how you go with this and let me know how you go

Chrs
Sam

1 Like