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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Target LIne Bar Chart

Delion_1-1613899506808.png

 

Hi I have questions about bar chart :

1. How to create dynamic target line based on value from table

2. How to resizing bar chart size to this with

3.How to show dynamic date based on filter

 

Thank

 

5 REPLIES 5
Anonymous
Not applicable

Hi  @Anonymous ,

Question 2 is not very clear

According to your description, I create this data:

v-yangliu-msft_0-1614067759383.png

Here are the steps you can follow:

Create measure.
avg =
var _1=
MAX('Table'[Date])
return
AVERAGEX(
    FILTER(
        SUMMARIZE(ALLSELECTED('Table'),
        'Table'[Date],
        "Avg Value",AVERAGE('Table'[Point])),
        'Table'[Date]<=_1),
        [Avg Value])

How to create dynamic target line based on value from table:

You can use line and stacked column chart in visual object to display bar chart and line chart

v-yangliu-msft_1-1614067759400.png

 

How to show dynamic date based on filter:

1. Create measure.

Measure =
var _min=MIN('Table'[Date])
var _max=MAX('Table'[Date])
return _min&"-"&_max

2. Find the title and choose FX

v-yangliu-msft_2-1614067759402.png

3. Based on field select the created measure

v-yangliu-msft_3-1614067759416.png

4. Display the date filtered by slicer through title

v-yangliu-msft_4-1614067759420.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

Anonymous
Not applicable

@Anonymous 

My question number 1, what I mean is like this :

I have data table and target table, this target will change every month and it need to show as line target in graph every month

This link for sample data I use :

http://tiny.cc/a5jqtz 

Delion_2-1614089136853.pngDelion_3-1614089147873.png

 

Delion_0-1614088433034.png

 

Anonymous
Not applicable

Hi  @Anonymous  ,

Line cannot be displayed dynamically in power bi

What is the implementation logic of your line target? It can be written as measreu and placed on the line chart for display.

Best Regards,

Liu Yang

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

Anonymous
Not applicable

@Anonymous 

My target line in table, you can check it here http://tiny.cc/a5jqtz 
And I have table fact, this table line will provide different taregt every month, example : Jan <30%, Feb <40%, Mar<50% and this target will show as target line in graph

Capture.PNG

parry2k
Super User
Super User

@Anonymous Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors