cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## Smooth lines

Is there any way to smooth lines on a line chart?

I'd like it to flow more like this one made in Excel, than the one below it made in PBI.

Many thanks

1 ACCEPTED SOLUTION
Memorable Member

hi. there is not a way to do this in powerbi that i am aware of.

I know that the smoothed line looks good but is it an accurate representation of the data?

// if this is a solution please mark as such. Kudos always appreciated.
14 REPLIES 14
Resolver II

Hello @Power-BI and @samdthompson :

You may be aware of this, but from the july 2023 release smooth lines are available.
See release note :
Release note july 2023

or the snippet from the release note below:

Kind regards!

If this solved your problem, consider marking this answer as a solution.

New Member

So I managed to get a decent result for a smoothed linechart on a monthly basis:

LogisticSmoothing =
VAR GrowthRate = 0.5
VAR CurrentRowDate = MAX(SHARED_Date[Date])
VAR CurrentRowDatePM = PREVIOUSMONTH(SHARED_Date[Date])
VAR EndMonth = ENDOFMONTH(SHARED_Date[Date])
VAR Midpoint = DATE(YEAR(CurrentRowDate), MONTH(CurrentRowDate), 15)
VAR Sales = CALCULATE([Total_sales], ALL(SHARED_Date), MONTH(CurrentRowDate) = MONTH(SHARED_Date[Date]), YEAR(CurrentRowDate) = YEAR(SHARED_Date[Date]))
VAR SalesPM = CALCULATE([Total_sales], ALL(SHARED_Date), CurrentRowDatePM)
VAR SalesDiff = sales - SalesPM
VAR LogisticSmoothedValue =
CALCULATE (
DIVIDE (
1,
1 + EXP ( - GrowthRate * ( DATEDIFF(Midpoint, CurrentRowDate, DAY) ) )
)
) * SalesDiff
RETURN
LogisticSmoothedValue + SalesPM

This Formula calculates the Sales on a monthly basis but between each start and end of the month it calculates the change in a logistical curve so it smooths out the numbers betweeen each monts close. Be aware that this only works if you have "dates" on your x-axis. It may not represent your accurate data between months bit it looks just nice.

Anonymous
Not applicable

Hi @Power-BI,
Here visual shows smooth lines instead of lines which will help you get different line styles. smooth lines. PBIVizEdit.com

This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,

• anyone, irrespective of technical skills, can create their own visuals
• 15 minutes to create a visual from scratch
• opens up many additional attributes to edit (for e.g. labels, tooltips, legends position, etc)

Give this a shot and let us know if you face any problems/errors.
You can use the editor to modify your visual further (some modifications cannot be done in the Power BI window and have to be in the editor).

Thanks,
Team PBIVizEdit

New Member

Hello,! The Power KPI worked in making the lines smooth or monotone.. The probem i encountered is when i publish it to wapp.powerbi workspace.. it is creating an error. the powerBi is already added in the power bi desktop but i dont see how i can add this to  app.powerbi

Post Prodigy

Hi All,

The below visual offers the same functionality of smoothing as that in excel.

https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381083?tab=Overview

Anonymous
Not applicable

@Kolumam  Is correct

When you download the "Power KPI" viz from the market place, you are going to want to edit the line by selecting 'Monotone'.  see screenshot

Best,

Eric

Memorable Member

hi. there is not a way to do this in powerbi that i am aware of.

I know that the smoothed line looks good but is it an accurate representation of the data?

// if this is a solution please mark as such. Kudos always appreciated.

If you want to represent a "Gauss Bell", it is completely necessary to have smooth lines to understand the distribution.

That's because i think it is necessary to have the possibility to represent a smooth line chart.

Josep.

"..is it an accurate representation of the data?" - it can often well be more accurate than showing only the measured points..

In case the data in question is anyway an estimate and contains error, representing smooth lines instead of absolute points only indicating that "it is roughly like X" is totally and utterly warranted in my opinion, being more truthful representation of the data. Also, for cases where you have continous phenomenon underneath (such as temperature...) but have only discontinuous measurements (say hourly), again, smoothing the lines to be continuous more truly represents the underlying distribution, of which the collected data is only a partly representing sample. I disagree with your stance for many a dataset of reality.

"..is it an accurate representation of the data?" - it can well be more accurate than showing only the measured points..

In case the data in question is anyway an estimate and contains error, representing absolute points instead of smooth lines indicating that "it is roughly like X" is totally and utterly warranted in my opinion. Also, for cases where you have continous phenomenon underneath (such as temperature...) but have only discontinuous measurements (say hourly), again, smoothing the lines to be continuous more truly represents the underlying distribution, of which the collected data is only a partly representing sample. I disagree with your stance for many a dataset of reality.

Post Patron

This was a while back...any chance this is possible in new version?

Community Champion

Seems like a terrible idea anyway. In that example picture the curves make the lines go higher and lower than the actual data points they're connecting. So the graph is lying. It looks pretty but it's worse than useless for representing data. It's a good thing that we don't have this "feature".

Proud to be a Super User!

In case the smooth lines would go over or under the actual observed values, yes, wrong, but in case they remain within the observed boundaries, result may well represent reality better than discontinuous observations of a phenomenon. Think of temperature and hourly measurements of it. Cheers.

Community Champion

If you do want this feature here you go

https://zoomcharts.com/en/microsoft-power-bi-custom-visuals/

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors