Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!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.
I want to make a weekly trend chart ,
i want to show sales by week as accumlative trend
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.
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).
Prepare your data model: Ensure that you have a date column in your dataset that represents the sales date.
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.
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.
Create a line chart: Add a line chart to your Power BI report canvas.
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.
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.
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
70 | |
50 | |
46 |
User | Count |
---|---|
46 | |
38 | |
29 | |
28 | |
28 |