Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Dynamic Target LIne Bar Chart

 

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

    Question 2 is not very clear

    According to your description, I create this data:

    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

     

    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

    3. Based on field select the created measure

    4. Display the date filtered by slicer through title

    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's avatar
      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 

       

       

      • Anonymous's avatar
        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.