This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. 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.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 44 | |
| 36 | |
| 23 | |
| 20 | |
| 20 |