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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Marc_Breuer
New Member

Add weighted trend line when time line is not complete - only several entries

Hello to the community,

 

In the source of my PowerBI-report, I have data on an item- and daily basis on which I have sold quantities.

However, these are not available for every day, but only for the days on which I have also sold items. This means that days also appear several times in my database (one row for each different item).

 

I have created a PowerBI report to visualise the sales quantities and prices by day and have already included a calendar containing weeks, months, quarters and years from the daily data.

 

Now I would like to visualise the quantities and prices sold in graphics and also show a trend line for the price.

 

Unfortunately, it is not possible to show a trend line, regardless of the type of chart I use (line chart, batch chart).

I would prefer to display this in a zebra chart - but it doesn't work here either.

 

My guess is that the display of a trend line only works if there is a daily date in the source data for each day - and not, as in my case, gaps (for the days on which I have no sales in my source).

 

Does anyone have any tips on how I can still insert a weighted trend line?

 

Thank you very much!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Marc_Breuer ,

 

Has you refer you need to have complete data to show trends, however is not on the quantities or fact table, the data needs to have no gaps in the calendar table and you need to select the continuous axis so that you can add the trend:

MFelix_0-1713368156691.pngMFelix_1-1713368735212.png

If you need any further assistance please let me know.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
Marc_Breuer
New Member

Thanks!

 

Then I`ll have to find an other way 🙂

Hi @Marc_Breuer,

 

Not sure if I have explained properly what I meant by having a continuous axis, you need to have a calendar without any gaps but you do not need to have data on all the days. 

 

Let's assume this example

You have data for only two days in the year january 20th and July 3rd, if you place this in your visual using the dates you won't be abble to do the continuous because there is only two dates, but if you add a calendar table with all the days in the year that is related with you date field on the factual table the you can use the calendar table to show the continuous axis, the line will be continuous but on the days that have no data you the values aren't presented andit shows a continuous line from January to July but with data only on 2 points. 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @Marc_Breuer ,

 

Has you refer you need to have complete data to show trends, however is not on the quantities or fact table, the data needs to have no gaps in the calendar table and you need to select the continuous axis so that you can add the trend:

MFelix_0-1713368156691.pngMFelix_1-1713368735212.png

If you need any further assistance please let me know.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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