This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I would like to calculate an average value for our product stock.
However we do not have a value for each day, but only for each day with a change.
It would be possible, but highly memory-intensive to precalculate all non-existent values.
Is there a possibility to add the last value using DAX syntax.
The table below shows how it should be calculated.
Cum_sum = 66
Avg := 66 / 7 = 9,43
| Date | Value | Cum_Sum |
| 01.06. | 7 | 7 |
| 02.06. | 8 | 15 |
| 03.06 | 23 | |
| 04.06. | 9 | 32 |
| 05.06. | 13 | 45 |
| 06.06. | 58 | |
| 07.06. | 8 | 66 |
Thank you for your ideas.
Justus
Solved! Go to Solution.
pls see the attachment below
Proud to be a Super User!
pls see the attachment below
Proud to be a Super User!
@ryan_mayu Thanks for the file.
However the server needs to store all of the Information.
We store 1 dataset per article (roughly 30.000) for each store (35) per day (6 months).
In order to even have a dataset for articles that haven't changed stock for a long time, we also store the last value that was longer than 6 months ago.
This means we would have to store an additional minimum of 189 Million - in reality more than a billion datasets on the server.
Would it be possible to just do the calculation using DAX?
Similar methods are based on the evolution of @ryan_mayu method. Based on what you said, using powerbi to process such a large data set is not his strong point. It is recommended that you use powerbi to visualize the data after processing the data at the data source.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 35 | |
| 30 | |
| 23 | |
| 22 |