The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello!
I'm having a hard time to calculate the running / cumulative total of average values...
My idea is to emulate a sales campaign for a product that never had one, using the average by day of all the products from an specific brand; problem is the code I made is only repeating the numbers from the average, it's not summing them up:
This is how it's now:
This is how it should be:
I managed to filter the values I want to calculate the average for, and that's for an specific brand (this is not going to be replicated to all products, and in the end I want to merge this in another calculated column which will calculate the goal for all the products (including the exception, which are the ones that never had a sales campaign before).
here's the code for the average:
AllPlutoProductsAverage = MAXX(FILTER('f_Leads(teste2)', [percentage] = EARLIER(d_CT_Leads_RT[percentage]) && 'f_Leads(teste2)'[group_name]="Pluto"), 'f_Leads(teste2)'[registers_per_day] )
And here's the code for the cumulative/running total column:
Any ideas on how I fix that...?
Thanks in advance!! 🙂
I hope the solution in this link helps:
https://community.powerbi.com/t5/Desktop/Cumulative-Sales-Without-Dates-on-Rows/m-p/366558#M165862
Hi,
Your question is not clear. There is no Date column there at all. Give a proper explanation of the expected result.
Hello!
Thanks for the replies! I'll review the video in a bit...
About the date column, what happens is that we track the campaigns duration as percentage, which uses the date to calculate every percentual point, but in reality we use date indirectly for our running totals calculation. So, consider my 'date' column the percentage one.
All I want the code to do is to sum up the averages per percentual point I demonstrated here, which for some reason I can't make it work.....
@talitanieps Not completely following this and not sure how you arrive at your desired values, but this may help:
Better Running Total - Microsoft Power BI Community
Hii,
Thanks for your reply - I watched the video and liked your approach to use a different way to calculate the running total without using CALCULATE; however, it didn't work for me... it gave me higher higher numbers than expected.
Any other idea on how I can propagate the mean/average of a series of numbers into a running total/cumulative total formula??
Thanks in advance!