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

Clustered Bar chart with individual reference line

Hello, I've been trying to create a clustered bar chart with a reference line for each column bar, something like the image below. 
Does anybody knows if it is possible? The reference line is the value for the same variable but from X months before (can be 4, 8, or any other value)
Thanks

Capture.JPG

6 REPLIES 6
asdf1608
Helper V
Helper V

@Anonymous I am trying to get the same seperate reference line for my dashboard. Have you been able to solve it. To get the reference line individual?

If yes, can you share me of how you got that

 

Thanks

Anonymous
Not applicable

anks for both of your answers, unfortunetadly I realize that what I need is not possible, and since it is an executive presentation I'll see how to either change the layout or continue using the previous software for that particular chart and start creating new ones in PBI.

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

To use the previous months value, you can create a meausre like this to calculate and use a month as a slicer:

Measure =
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Date].[MonthNo]
            = SELECTEDVALUE ( 'Table'[Date].[MonthNo] ) - 2   //this calculate two months ago value,depends on the acutal need
            && 'Table'[Category] IN DISTINCT ( 'Table'[Category] )
    )
)

Enable the Stepped option under the Shape menu, change the measure color to white under Data colors menu, diable the legend option, the result would be like this:

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Yingjie Li

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

 

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can try to use the Analysis pane to set the reference line in power bi desktop.

analysis pane.png

Please refer this document:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane

 

If the line value is one of the previous month value, you can write a measure to calculate it and use this measure as the reference line.

 

Best Regards,
Yingjie Li

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

Anonymous
Not applicable

Hello Yingjie  thanks for your reply, unfortunetadly, this option only allows for a single reference line accross all the graph, which is not the requirement.

 

Regards

amitchandak
Super User
Super User

@Anonymous , See if this can help

 

I created something like this. Line Stepped - on, Marker - On. Marker --

Line color - white

Screenshot 2020-09-24 20.33.06.png

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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