Forum Discussion
Date Mapping - comparison (current year vs last year)
Having a little trouble understanding exactly what you are trying to do here but if you have 2018 in one table and 2019 in another table then you should be able to connect your CurrentYearDate to your DOB in 2019 table and LastYearDate to your DOB in your 2018 table. Is that what you are going for or do you have 2018 and 2019 dates in a single table? If that is the case, then you could form 2 relationships and the use USERELATIONSHIP in your calculations to determine which relationship to use.
Looks like you are trying to do same store sales or something similar. I would suggest ditching the mapping entirely and letting machine learning do the the job for you. :)
Greg_Deckler Thank you for prompt reply
let me explain you more clear
First table in picture has entire data from 2018 & 2019
Table no 2 has date mapping 2019 vs 2018
Now i am looking support for performance comparision example
yesterday i.e. 02nd Jan 2019 Sales 100,000 which is positive 125 % growth as Last year i.e. 03rd Jan 2018 80,000 SALES
Is that clear enough ?
- v-jiascu-msft7 years agoMicrosoft Employee
Hi Arif270182,
I was going to recreate the date table. But I found Greg_Deckler's idea is great due to you already have the mapped dates. Please download the demo from the attachment.
1. Create two relationships.
2. Create a measure.
Measure = DIVIDE ( SUM ( FactTable[Value] ), CALCULATE ( SUM ( FactTable[Value] ), USERELATIONSHIP ( DateMapping[LastYearMapDate], FactTable[DOB] ) ) )
Best Regards,
Dale - v-jiascu-msft7 years agoMicrosoft Employee
- Arif2701827 years agoHelper II
Hi Support
Apologies for late reply - No this one still not working :(
will share more details soon