Forum Discussion

capko's avatar
capko
Icon for Helper II rankHelper II
1 year ago
Solved

Targets in clustered chart

Hello,

 

I would like to create a chart defining targets for clusters in a clustered column chart. In the following image we've a chart with differents clusters and the red lines are the targets I want to define.

 

 

Do you know any custom visual that already exist to make that or any other way to do it ?

 

 

  • Hello !

    I found this old thread : Solved: Bar/Cluster Chart with horizontal target area bar - Microsoft Fabric Community

    You can try the error bar features as recommended by amitchandak youtube.com/watch?v=HXgnGkflkjQ

    You can use line and clustered column chart and a measure that returns the target for each X-axis category.

    Create a small table with one row per cluster and its target:

    Targets =
    DATATABLE(
        "Cluster", STRING,
        "Target",  DOUBLE,
        {
          {"Cluster A", 120},
          {"Cluster B", 75},
          {"Cluster C", 18},
          {"Cluster D", 6},
          {"Cluster E", 10}
        }
    )
    

     

    Targets[Cluster] should be in your axis field.

    If you want the red horizontal line inside each cluster (not connected across clusters), use the free Deneb custom visual.

6 Replies

  • Hello !

    I found this old thread : Solved: Bar/Cluster Chart with horizontal target area bar - Microsoft Fabric Community

    You can try the error bar features as recommended by amitchandak youtube.com/watch?v=HXgnGkflkjQ

    You can use line and clustered column chart and a measure that returns the target for each X-axis category.

    Create a small table with one row per cluster and its target:

    Targets =
    DATATABLE(
        "Cluster", STRING,
        "Target",  DOUBLE,
        {
          {"Cluster A", 120},
          {"Cluster B", 75},
          {"Cluster C", 18},
          {"Cluster D", 6},
          {"Cluster E", 10}
        }
    )
    

     

    Targets[Cluster] should be in your axis field.

    If you want the red horizontal line inside each cluster (not connected across clusters), use the free Deneb custom visual.

  • Shahid12523's avatar
    Shahid12523
    Icon for Community Champion rankCommunity Champion

    Built-in workaround: Use Line and Clustered Column Chart with separate DAX measures for each target. Works if clusters are predictable.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi capko ,

     

    You’re on the right track. The built-in Line and Clustered Column Chart can work if you’re fine with the target line spanning all clusters. But since you want the red line to show separately for each cluster, the standard visual won’t fully meet your needs.

    A better approach is to create a small target table, with one row per cluster and its target, and then either:

    • Use it in a combo chart if connected lines are okay, or
    • Try the free Deneb custom visual (using Vega-Lite), which lets you plot horizontal rules for each cluster without connecting them.

    This will give you the exact behavior shown in your example image, with separate red lines as cluster-specific targets.


    Thank you,

    Tejaswi.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi  capko ,

       

      I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

       

      Thank you,

      Tejaswi.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi capko,

        I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

         

        Thank you.

    • v-dineshya's avatar
      v-dineshya
      Icon for Community Support rankCommunity Support

      Hi capko ,

      We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

       

      Regards,

      Dinesh