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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Power-BI
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.

Capture.JPG

Capture2.JPG

 

Many thanks

1 ACCEPTED SOLUTION
samdthompson
Memorable Member
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.

View solution in original post

14 REPLIES 14
cosm
Resolver II
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:

cosm_0-1691061888683.png

 


Kind regards!

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

cwert
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
 
cwert_0-1683193096945.png

 

 

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.comsmooth lines. PBIVizEdit.com 

 

Download link for the custom visual file on this page,

https://pbivizedit.com/gallery/smooth-lines-in-line-chart 

 

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

Anonymous
Not applicable

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

 

 

cvcarubio_0-1636763223288.png

 

Kolumam
Post Prodigy
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

 

 

EricGottlieb2_0-1596045423658.png

 

Best,

Eric

samdthompson
Memorable Member
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.

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

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".





Did I answer your question? Mark my post as a solution!

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.

Sean
Community Champion
Community Champion

If you do want this feature here you go

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

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.