Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
my dataset is on a weekly base. I need to create a formula that uses the cumulative sum for the last completed 52 weeks of the comsumption and divides by the average of the stock for the last 52 weeks. The goal is to create the inventory turnover rate.
Example:
Currently, we are on week 35 of 2024 (2024W35). Thus, I want to calculate the sum the comsumption from 2024W34 to 2023W35 (last 52 complete weeks). Then I want to do the average of the stock for the same time period. Then divide the sum of the comsumption by the average of the stock in order to obtain the inventory turnover rate.
During week 33, the time period changes to 2024W33 to 2023W34. During week 32, my time period changes to 2024W32 to 2023W33.
I also want to make sure that when there is not enought weeks (52) to calculate the cumulative sum or average, the result is empty.
In excel, I create the formulas as I need (average_52_weeks_stock, sum_comsumption, inventory_turnover_rate). However, I am unable to do this in power bi. I don't even know from where to start. Could you please help me?
Dummy Power BI and Excel:
Solved! Go to Solution.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 23 |