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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Line Chart

Hi,

 

is it possible to get a line chart in power-bi which looks like this?

karthikbv4_0-1627028411771.png

I just want to display 4 values, minimum, maximum, average and the actual value. I tried and got this output.

karthikbv4_1-1627028509711.png

 

Should I add anything for the X-axis? Any help is appreciated. 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment), please check whether that is what you want.

1. Create a calculated column as below

Type = 
VAR _max =
    MAX ( 'Table'[Spend] )
VAR _min =
    MIN ( 'Table'[Spend] )
VAR _avg =
    AVERAGE ( 'Table'[Spend] )
VAR _actual = 'Table'[Spend]
RETURN
    SWITCH (
        'Table'[Spend],
        _max, "Highest Spend",
        _min, "Lowest Spend",
        _avg, "Average Spend",
        "Actual Spend"
    )

2. Create a line chart(Axis: Time Frame  Legend: Type  Values: Spend)

yingyinr_0-1627437559831.png

Best Regards

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @Anonymous ,

Could you please provide some sample data(exclude sensitive) which refer in the line chart? And the legend value Lowest Spend, Average Spend and Highest Spend are from the fact field or some measures? If they are from measures, could you please provide the related formula? Thank you.

By the way, the label of the line chart changes according to the value and cannot be customized...

Best Regards

Anonymous
Not applicable

Hi, thanks for replying.
Please, find the dummy data. The maximum is calulcated as Max(Spend), same for min and average. They are all calculated based on the spend column.

karthikbv4_0-1627385381002.png

 

Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment), please check whether that is what you want.

1. Create a calculated column as below

Type = 
VAR _max =
    MAX ( 'Table'[Spend] )
VAR _min =
    MIN ( 'Table'[Spend] )
VAR _avg =
    AVERAGE ( 'Table'[Spend] )
VAR _actual = 'Table'[Spend]
RETURN
    SWITCH (
        'Table'[Spend],
        _max, "Highest Spend",
        _min, "Lowest Spend",
        _avg, "Average Spend",
        "Actual Spend"
    )

2. Create a line chart(Axis: Time Frame  Legend: Type  Values: Spend)

yingyinr_0-1627437559831.png

Best Regards

Anonymous
Not applicable

Hi, I noticed that if the value obtained by the expression for average is not in the present in the column Spend, it wont be displayed. Is there any way to fix this? 😥

Anonymous
Not applicable

Hi @Anonymous ,

Since there is no corresponding average value in the table, the value "Average Spend" will not appear in Type field. We can go to Analytics pane and add an average line to the line chart as a workaround just as shown in below screenshot.

Use the Analytics pane in Power BI Desktop

yingyinr_0-1627525595834.png

Best Regards

Anonymous
Not applicable

Ok, Thank you very much.

Anonymous
Not applicable

Hi, is there any way to achieve the below visual with the same dataset as above? Thanks again

karthikbv4_0-1627473575695.png

 

lbendlin
Super User
Super User

You should not use a line chart for this purpose. Line charts suggest relationships between the data points. Your data points do not satisfy these criteria. Use a different, less misleading representation.

Anonymous
Not applicable

I understand that but Im not in a position to propose or use another visual

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.