The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am stuck for a while on this and also tried to google around.
I have a set of raw revenue data by site and by month. I need to get the cumulative running total and bring it to another table using summarize function (in order to union with other scorecard metrics for some other purpose).
Site | Month | Revenue |
A | Jan 24 | 10 |
A | Feb 24 | 30 |
B | Jan 24 | 5 |
B | Feb 24 | 2 |
Yes I can calculate cumulative running total using either quick measure or YTD function, it is working fine on original table. However once I summarize and bring to another table, the cumulative is not working and only showing monthly data.
What I need: A new summarised table with cumulative revenue
Site | Month | YTD Revenue |
A | Jan 24 | 10 |
A | Feb 24 | 40 |
B | Jan 24 | 5 |
B | Feb 24 | 7 |
Solved! Go to Solution.
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the Calculated Columns I've created for your needs:
YTD Revenue = SUMX(FILTER(ALLSELECTED('Table'),'Table'[Site]=EARLIER('Table'[Site])&&'Table'[Month]<=EARLIER('Table'[Month])),'Table'[Revenue])
3.If you want the visualization objects in the other table to display correctly as well, I hope you can check that the relationship between your two tables meets your requirements, in my example I have created an index column and related the two tables with this.
4.Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the Calculated Columns I've created for your needs:
YTD Revenue = SUMX(FILTER(ALLSELECTED('Table'),'Table'[Site]=EARLIER('Table'[Site])&&'Table'[Month]<=EARLIER('Table'[Month])),'Table'[Revenue])
3.If you want the visualization objects in the other table to display correctly as well, I hope you can check that the relationship between your two tables meets your requirements, in my example I have created an index column and related the two tables with this.
4.Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much. Creating a new column using SUMX and Earlier did the magic. I then use SUMMARIZE that brings cumulative number into new table.
Relationship not required for my context as I need a totally independent new table.
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |