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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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