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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
ahmoh43
New Member

How can I make sales Weekly Trend ?

I want to make a weekly trend chart , 

i want to show sales by week as accumlative trend

3 REPLIES 3
Anonymous
Not applicable

Hi @ahmoh43 

 

Could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

danextian
Super User
Super User

Hi @ahmoh43 ,

We can only give you a general advise without enough information. @123abc has already given you one and pretty detailed at that given the data provided. If you want a better answer, please provide a workable sample data (not an image).





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
123abc
Community Champion
Community Champion

  1. Prepare your data model: Ensure that you have a date column in your dataset that represents the sales date.

  2. Create a calendar table: If you haven't already, create a calendar table that includes a column for each day in your dataset. This table will allow you to group sales by week.

  3. Create a measure for accumulative sales: You'll need to create a DAX measure that calculates the accumulative sales up to a certain week. Here's how you can do it:

Accumulative Sales =
VAR CurrentWeek = MAX('Calendar'[WeekNumber])
RETURN
CALCULATE(
SUM('Sales'[SalesAmount]),
'Calendar'[WeekNumber] <= CurrentWeek
)

 

In this measure, we use the MAX function to get the current week number from the calendar table. Then, we use the CALCULATE function to sum up the sales amount for all weeks less than or equal to the current week.

  1. Create a line chart: Add a line chart to your Power BI report canvas.

  2. Configure the line chart: Add the week number from your calendar table to the Axis field well of the line chart. Then, add the Accumulative Sales measure to the Values field well.

  3. Format the chart: Customize the appearance of the chart as per your preferences, including titles, axis labels, and colors.

By following these steps, you should be able to create a weekly trend chart showing accumulative sales in Power BI using DAX.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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