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
Anonymous
Not applicable

How to show start of week on x-axis for forecast chart

I have a chart which is supposed to show weekly sales forecast and it does. The two date fields i have contain daily date and a start of week date field ( a new week starts on a Sunday) that were used to create the chart below.

 

When drag the date fields (Daily date and start of week fields) to the axis area and the sales field to the values area. I get the chart below with the forecast that i need but what i want is for the chart to show the forecast with the start of week showing on the x-axis instead of the month year. Not sure how to solve this. If you can use DAX to solve the problem, that would be awesome. Thanks for your help.

 

Capture.PNG

6 REPLIES 6
Greg_Deckler
Super User
Super User

@Anonymous - You can not do a forecast with a categorical axis.

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

Thanks for your response. I'm aware that i cannot do a forecast with a categorical field that is why i have two date fields. The actual daily date field and the start of week field. May be they aren't doing the right job but all i want is a weekly forecast that shows the and the x-axis showing the start of the week. or i i have a create a new field or measure that's fine too, I'm open to better ways if any. Thanks.

@Anonymous  There-in lies the problem. If you use Continuous axis, you can't control 100% what shows up in the axis. You can control what shows up in the axis using Categorical but you can't do forecast. Your goals are at odds with one another. 

 

There is a long shot. Use stacked visuals. In the continuous one, turn off the x axis. In the categorical one, make the line color the same as the background.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous , Not very clear . Make the axis Categorical and try

 

Axis_type.png

Anonymous
Not applicable

@amitchandak 

 

Thanks for you prompt response. Your suggestion gave me what i need on the x-axis but not as a forecast. It shows it as a normal line chart. Here is a snapshot below. I need the weekly forcast.

 

Capture.PNG

@Anonymous , Forecast will only work with continuous data. So You can one of the two. It does not matter whether you choose a week date of date. It will just need a continuous input and forecast on top of that.

 

Log an idea it should be supported on dates even if they are categorical- https://ideas.powerbi.com/ideas/

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.