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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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