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
Hi,
I have a line graph that displays the following:
X-Axis(Axis) = 'Daily_Prod'.[Days On Production]
Y-Axis(Vallue) = 'Daily_Prod'[Oil]
Legend = 'Well_Header'[Well_Group]
This graph works great but I need to make a running total graph of the plotted values. Specifically, I need a line graph that first averages the data based the Legend [Well_Group] and the X-Axis [Days_On_Prod]. Then, I need to plot a running total of this averaged value. Any help would be greatly appreciated. Thanks in advance.
Solved! Go to Solution.
Hi, @Aggie_Cls__93
In your case, EARLIER function is my suggestion to create a calculate column or a measure, and then use it to create the line graph:
If I understand your question correctly, the following formula should work:
Running Average by Category =
CALCULATE (
AVERAGE ( Daily_Prod[Oil] ),
FILTER (
Daily_Prod,
Daily_Prod[Days On Production] <= EARLIER ( Daily_Prod[Days On Production] )),
Daily_Prod[Well_Group] = EARLIER ( Daily_Prod[Well_Group] )
)
Best, Regards,
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Aggie_Cls__93
In your case, EARLIER function is my suggestion to create a calculate column or a measure, and then use it to create the line graph:
If I understand your question correctly, the following formula should work:
Running Average by Category =
CALCULATE (
AVERAGE ( Daily_Prod[Oil] ),
FILTER (
Daily_Prod,
Daily_Prod[Days On Production] <= EARLIER ( Daily_Prod[Days On Production] )),
Daily_Prod[Well_Group] = EARLIER ( Daily_Prod[Well_Group] )
)
Best, Regards,
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Assuming that Days on Production is where you want to be base the running total on, you can have a measure like this:
Running Total =
CALCULATE (
[Aggregation Measure],
FILTER (
ALLSELECTED ( Daily_Prod ),
Daily_Prod[Days On Production] <= MAX ( Daily_Prod[Days On Production] )
)
)Just a tip:
Please post a sample data that can be copy pasted and your expected results. You'll get faster and better responses.
Thanks Dan. Good feedback on being more specific. I'm going to do a better job and repost.
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 |
|---|---|
| 39 | |
| 28 | |
| 27 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 37 | |
| 32 | |
| 26 | |
| 25 |