Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
i have a very simple data-set but I am struggling extremly on how to tackle it.
I would like to calculate various measures but I am extremely struggling with all of them as the dataset is basically a summary and not a raw-data set with actual monthly values.
SampleData:
ID | ImplementationDate | MonthlySavings | MonthsSinceImplementation |
1 | 15-Aug-22 | 10 | 6 |
2 | 20-Oct-22 | 15 | 4 |
3 | 12-Dec-22 | 5 | 2 |
I linked my dataset to a Date-Table.
And calculated: NewSavingsByDate=CALCULATE(SUM(Data[MonthlySavings]),USERELATIONSHIP('Calendar'[Date],Data[ImplementationDate]))
I also added a column: MonthsSinceImplementation = DATEDIFF(Data[ImplementationDate],TODAY(),MONTH)
With this I wanted to calculate the Total Savings = CALCULATE(SUM([MonthlySavings]*SUM([MonthsSinceImplementation].
This works per row, but not for the full data, as it then gives me "(10+15+5)*(6+4+2) = 360"
I tried with "ALLEXCEPT" filter on ID but this didn't change anything on the result.
Further Required Calculations:
Running Total Savings should look like this:
ID | Aug-22 | Sep-22 | Oct-22 | Nov-22 | Dec-22 | Jan-23 | Feb-23 | TOTAL |
1 | 0 | 10 | 10 | 10 | 10 | 10 | 10 | 60 |
2 | 0 | 0 | 0 | 15 | 15 | 15 | 15 | 60 |
3 | 0 | 0 | 0 | 0 | 0 | 5 | 5 | 10 |
TOTAL | 0 | 10 | 10 | 25 | 25 | 30 | 30 | 130 |
Running accumulated Savings should look like this
ID | Aug-22 | Sep-22 | Oct-22 | Nov-22 | Dec-22 | Jan-23 | Feb-23 | TOTAL |
1 | 0 | 10 | 20 | 30 | 40 | 50 | 60 | 60 |
2 | 0 | 0 | 0 | 15 | 30 | 45 | 60 | 60 |
3 | 0 | 0 | 0 | 0 | 0 | 5 | 10 | 10 |
TOTAL | 0 | 10 | 20 | 45 | 70 | 100 | 130 | 130 |
I hope someone could lead me to the right direction...
Thanks in advance!
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |