Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello! I'm fairly new to Power BI and was hoping for assistance.
I have a data set that tracks the number of calls per hour for a service desk as well as the number of agents that are working that hour. I've got a visual of a Line and Stacked Column chart that correctly shows the calls per hour along the x-axis and the number of agents on duty is shown as the line value.
What I am trying to do is add a second line value to the graph showing the recommended number of agents required. I've added several measures to assist with calculating the number of agents but i've ran into an issue. The formula to calculate the agents required is being converted from an existing VBA formula:
A_n = 1
SumA_k = 0
For k = agentStep To 0 Step -1 A_k = A_n * k / Intensity SumA_k = SumA_k + A_k A_n = A_k Next k
Is there any way I can convert something like this to a measure? Or is this something that will have to be calculated on the excel spreadsheet first with VBA and then imported into Power BI? The problem is that agentStep is not a static amount or I would just hardcode the loop and I couldn't find any way to loop within a measure to calculate a value like this.
Thanks for any help!
See the discussion in link below.
https://community.powerbi.com/t5/Desktop/Ahead-Moving-Average-Circle-Reference/td-p/254814
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 23 | |
| 22 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 44 | |
| 42 | |
| 40 | |
| 39 |