Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
puru85
Helper II
Helper II

Adding 12M Average Sales Trend in Line Chart with Dynamic Parameters

Hi Experts,

I have a line chart  with the following configuration:

  • X Axis: Date
  • Y Axis: Parameters (A group of measures)

Requirement:

  • When "Total Sales" is selected in the Parameter Filter, I want to display it together with the "12M Average Sales Trend."

    puru85_0-1721320319668.png

    I tried adding the "12M Average Sales Trend" in the trendline, of Line Chart  but there was no option to insert the "12M Average Sales Trend" measure.

Could anyone please help me achieve this? I am open to new ideas or alternative solutions.

Attached is my PBIX:
Parameter Line Chart - Sales and 12M AVG Sales.pbix

Thank you!


2 ACCEPTED SOLUTIONS
mrandall86
Frequent Visitor

Hi,

I think if you go to add line and click the fx over to the right and you can choose to add a measure:

 

mrandall86_0-1721322020591.png

 

 

mrandall86_1-1721322050629.png

 

View solution in original post

puru85
Helper II
Helper II

Hi @v-xinruzhu-msft  @mrandall86 

I managed to fix this by using below measure:

This measure will show [12MAverageSales] only when "Total Sales" is selected in the Parameter Filter. 

Display12MAverageSales =
IF (
    SELECTEDVALUE(Parameter[Parameter Order]) = 0,
    [12MAverageSales],
    BLANK()
)

View solution in original post

3 REPLIES 3
puru85
Helper II
Helper II

Hi @v-xinruzhu-msft  @mrandall86 

I managed to fix this by using below measure:

This measure will show [12MAverageSales] only when "Total Sales" is selected in the Parameter Filter. 

Display12MAverageSales =
IF (
    SELECTEDVALUE(Parameter[Parameter Order]) = 0,
    [12MAverageSales],
    BLANK()
)
v-xinruzhu-msft
Community Support
Community Support

Hi @puru85 

Based on your description, you can add the measure to the y-axis directly.

vxinruzhumsft_0-1721357653072.png

Output

vxinruzhumsft_1-1721357669944.png

 

vxinruzhumsft_2-1721357680637.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mrandall86
Frequent Visitor

Hi,

I think if you go to add line and click the fx over to the right and you can choose to add a measure:

 

mrandall86_0-1721322020591.png

 

 

mrandall86_1-1721322050629.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.