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 September 15. Request your voucher.
Hi,
I'm new to Power BI and have this requirement. I have a table with all the columns from measures. Column 2(Monthly Turnover LY) is calculated using a measure. Now, I want to write another measure to calulate the running total of Column 2(Monthly Turnover LY). I tried using SUM but its not working on measure. Is there a way to calculate a running total on a existing measure? Need something like the below table. Any guidence would be much appreciated.
Month | Monthly Turnover LY(Measure) | Monthly Turnover LY Running Total(Measure?) | Monthly Turnover(Measure) | Monthly Turnover Running Total? |
April | 10 | 10 | 20 | 20 |
May | 20 | 30 | 30 | 50 |
June | 20 | 50 | 40 | 90 |
Thanks for your suggestion. I tried what you said but the running total is returning the same value as Net revenue. I'll expain it a bit more with the actual case. (I've edited the table in the original post )
There are two measures written already to calculate Monthly Turnover and Monthly Turnover Last year.
Monthly Turnover:
@Anonymous,
Try these measures:
Monthly Turnover LY Running Total =
CALCULATE (
[Monthly Turnover],
FILTER (
ALL ( 'Date' ),
'Date'[Month Num] <= MAX ( 'Date'[Month Num] )
&& 'Date'[Year]
= MAX ( 'Date'[Year] ) - 1
)
)
Monthly Turnover Running Total =
CALCULATE (
[Monthly Turnover],
FILTER (
ALLSELECTED ( 'Date' ),
'Date'[Month Num] <= MAX ( 'Date'[Month Num] )
)
)
Proud to be a Super User!
Hi @Anonymous
Have you realized your old requirement? If yes, kindly share your solution so that others have same problem can refer to it.
If not, based on your new requirement, I guess you've created the PBI file, so could you kindly share the PBI file after removing sensitive information? Or a sample file with simple data and simple structure. so that we can work on it quickly. Thanks.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous,
Try this measure. It assumes a date table with columns Date, Month, and Month Num. The date table has a relationship with the data table based on the date column. The visual uses Month from the date table.
Running Total =
CALCULATE (
[Net Revenue],
FILTER (
ALLSELECTED ( DimDate ),
DimDate[Month Num] <= MAX ( DimDate[Month Num] )
)
)
Proud to be a Super User!
User | Count |
---|---|
70 | |
64 | |
61 | |
49 | |
28 |
User | Count |
---|---|
117 | |
81 | |
65 | |
55 | |
43 |