Forum Discussion
Last Year Measure amount on different row
hi
I would like my last year measure to show the last year amount on the same row as the current year amount. Currently it is doing it like the yellow part and I would like it to look like the one on the right in green:
MonthEnd comes from a different dimension table to Date. eg DIM_AccountingPeriods[MonthEnd] and DIM_Date[Date]
Fact joins to DIM_AccountingPeriod and DIM_AccountingPeriod joins to DIM_Date. DIM_Date is my date table and DIM_AccountingPeriod has the accounting periods for different companies at a day level.
My measure is as follows:
CALCULATE (
[Amount],
DATEADD ( 'DIM_Date'[Date], -1, YEAR )
)
Is there anything I can change or add to my measure to have the desired effect?
4 Replies
- andhiii079845Solution Sage
My question is if you add manually this: row, it does not fit to the other rows logic:
Monthend Date
"2014/06/30" "2015/06/10"- AnonymousNot applicable
- andhiii079845Solution Sage
I am sorry for me short answer before. I look to your data your write:
Monthend date amount amont last year 2014/06/30 2015/06/10 Y 2015/06/30 2015/06/10 X Your desired result:
Monthend date amount amont last year 2015/06/30 2014/06/10 X Y My question how this should work? You have first to different rows: 2014/06/30 and 2015/06/30 in Monthend. How is this column generate? This was my question if you insert this monthend date manually or is this calculated? This 2014/06/30 do not fit to 2015/06/10 (2014 instead of 2015). If i compare it to the other columns you have everytime the same year in both columns: date and monthend.