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 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 |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |