Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
Hoping you can help me, because I've looked online and I can't find a solution for this.
I want to create a chart where I show the cumulative sales per day (not per date), using a table that contains the sales amount per date/per product/per channel.
So I have this sample table below:
Date | Product | Channel | Amount |
01/05/2025 | A | Store | 55 |
01/05/2025 | A | Online | 44 |
01/05/2025 | A | Person | 37 |
01/05/2025 | B | Store | 8 |
01/05/2025 | B | Online | 44 |
01/05/2025 | B | Person | 95 |
02/05/2025 | A | Store | 16 |
02/05/2025 | A | Online | 27 |
02/05/2025 | A | Person | 10 |
02/05/2025 | B | Store | 91 |
02/05/2025 | B | Online | 85 |
02/05/2025 | B | Person | 88 |
04/05/2025 | A | Store | 56 |
04/05/2025 | A | Online | 79 |
04/05/2025 | A | Person | 77 |
04/05/2025 | B | Store | 91 |
04/05/2025 | B | Online | 77 |
04/05/2025 | B | Person | 61 |
04/05/2025 | C | Store | 22 |
04/05/2025 | C | Online | 39 |
04/05/2025 | C | Person | 100 |
05/05/2025 | C | Store | 36 |
05/05/2025 | C | Online | 55 |
05/05/2025 | C | Person | 2 |
The first particular thing about this chart is that I need to use days and not dates, meaning that if the I'm looking at product A, the cumulative value for the 1st day are the cumulative sales of 1st of May, because it's the first day of sales for that product. For product C, the 1st day is the date 4th of May. The reason for this is because I want to compare the first days/weeks/months of each product per channel, in order to spot selling patterns.
Product A | |||
Date | Day | Sum | Cumulative |
01/05/2025 | 1 | 136 | 136 |
02/05/2025 | 2 | 53 | 189 |
03/05/2025 | 3 | 0 | 189 |
04/05/2025 | 4 | 212 | 401 |
Product C | |||
Date | Day | Sum | Cumulative |
04/05/2025 | 1 | 161 | 161 |
05/05/2025 | 2 | 93 | 254 |
Another thing that I need is that the days without sales, must be considered to the chart with cumulative values from the previous days.
Total | |||
Date | Day | Sum | Cumulative |
01/05/2025 | 1 | 283 | 283 |
02/05/2025 | 2 | 317 | 600 |
03/05/2025 | 3 | 0 | 600 |
04/05/2025 | 4 | 602 | 1202 |
05/05/2025 | 5 | 93 | 1295 |
Hope this description helps.
Solved! Go to Solution.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Hi @Kuri_191,
May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Kuri_191,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @Kuri_191,
Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @ThxAlot, @lbendlin & @anilelmastasi for sharing valuable insights.
Could you please confirm if your query has been resolved by the provided solution? If so, please mark it as the solution. This will help other community members solve similar problems faster.
Thank you.
Hello @Kuri_191 ,
You need to calculate the running day number for each product — this means the first date a product has sales is Day 1, the next date is Day 2, etc., even if some dates are missing in between. This is an calculated column DAX:
DayNumber =
RANKX(
FILTER(
Sales,
Sales[Product] = EARLIER(Sales[Product])
),
Sales[Date],
,
ASC,
DENSE
)
This gives you the Day column you want per product.
And then you need to calculate daily sum per product, create a measure:
Daily Sales = SUM(Sales[Amount])
Now create a cumulative measure:
Cumulative Sales =
CALCULATE(
[Daily Sales],
FILTER(
ALL(Sales),
Sales[Product] = MAX(Sales[Product]) &&
Sales[DayNumber] <= MAX(Sales[DayNumber])
)
)
For your last need:
---Create a Date table in your model — make sure it covers all dates.
---Create a Product-Day matrix:
-Add Date from the Date table.
-Add Product.
-Show Cumulative Sales measure.
---In your visual → turn on “Show items with no data” for the Date axis.
Final Cumulative Sales =
VAR LastValue =
CALCULATE(
[Cumulative Sales],
FILTER(
ALL(Sales),
Sales[Product] = MAX(Sales[Product]) &&
Sales[DayNumber] <= MAX(Sales[DayNumber])
)
)
RETURN
COALESCE(LastValue,
CALCULATE(
MAXX(Sales, [Cumulative Sales]),
FILTER(
ALL(Sales),
Sales[Product] = MAX(Sales[Product]) &&
Sales[DayNumber] < MAX(Sales[DayNumber])
)
)
)
If this solved your issue, please mark it as the accepted solution. ✅