Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Comparing data using three dates from two tables

Capture.JPGHello All,

I have two dates in a single  table called history , scenario date and reporting date and have values of salary proposed tied to it. I have another table called current having report date and actual salary tied to it. I want to know 3 months back of current table report date that how much salary was proposed for that month and what is the difference between these two values on a monthly level. In that way i can do the salary forecast error and accuracy. The relationship between these tables are through bridge table of employee. Please help me out finding it, I am putting a sample data in excel.

Thank You 

3 REPLIES 3
v-danhe-msft
Employee
Employee

Hi @Anonymous ,

What is your data structure for your HISTORY TABLE and does below picture show all the data in your CURRENT TABLE?

1.PNG

Could you please post your HISTORY TABLE data in a tbale(not matrix) and post your desired result that I could test for you? Or you could just upload a pbix file to have a test.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Daniel,


I can not give you actual data but giving you a similar data . I am not able to post an excel so putting data here, if you know any way to upload a file , please let me know, I am new to the community.
Thanks

Scenario_DateEmployee ID Proposed Salary SDATE
8/1/2018 0:001                                               9,2101/1/2019 0:00
8/1/2018 0:001                                             54,9702/2/2019 0:00
8/1/2018 0:001                                             52,5603/13/2019 0:00
8/1/2018 0:001                                             27,3604/18/2018 0:00
8/1/2018 0:001                                             36,4803/25/2018 0:00
8/1/2018 0:001                                             20,4905/1/2018 0:00
8/1/2018 0:001                                             45,6006/8/2018 0:00
8/1/2018 0:001                                             33,1207/15/2018 0:00
8/1/2018 0:001                                             27,3608/22/2018 0:00
8/1/2018 0:001                                             15,6009/1/2018 0:00
8/1/2018 0:001                                             46,20010/6/2018 0:00
8/1/2018 0:001                                             42,69011/13/2019 0:00
8/1/2018 0:001                                             36,48012/20/2018 0:00
9/1/2018 0:001                                               6,4801/1/2019 0:00
9/1/2018 0:001                                             64,7402/2/2019 0:00
9/1/2018 0:001                                             48,6503/13/2019 0:00
9/1/2018 0:001                                             45,6004/18/2018 0:00
9/1/2018 0:001                                             15,6003/25/2018 0:00
9/1/2018 0:001                                             38,8805/1/2018 0:00
9/1/2018 0:001                                             76,8106/8/2018 0:00
9/1/2018 0:001                                             36,4807/15/2018 0:00
9/1/2018 0:001                                               9,1208/22/2018 0:00
9/1/2018 0:001                                               1,9209/1/2018 0:00
9/1/2018 0:001                                             48,00010/6/2018 0:00
9/1/2018 0:001                                             59,17011/13/2019 0:00
9/1/2018 0:001                                             57,17012/20/2018 0:00
10/1/2018 0:003                                               6,4801/1/2019 0:00
10/1/2018 0:003                                             64,7402/2/2019 0:00
10/1/2018 0:003                                             48,6503/13/2019 0:00
10/1/2018 0:003                                             45,6004/18/2018 0:00
10/1/2018 0:003                                             15,6003/25/2018 0:00
10/1/2018 0:003                                             38,8805/1/2018 0:00
10/1/2018 0:003                                             54,9706/8/2018 0:00
10/1/2018 0:003                                             52,5607/15/2018 0:00
10/1/2018 0:003                                             27,3608/22/2018 0:00
10/1/2018 0:003                                             36,4809/1/2018 0:00
10/1/2018 0:003                                               9,12010/6/2018 0:00
10/1/2018 0:003                                               1,92011/13/2019 0:00
10/1/2018 0:003                                             48,00012/20/2018 0:00
8/1/2018 0:002                                               9,2101/1/2019 0:00
8/1/2018 0:002                                             54,9702/2/2019 0:00
8/1/2018 0:002                                             52,5603/13/2019 0:00
8/1/2018 0:002                                             27,3604/18/2018 0:00
8/1/2018 0:002                                             36,4803/25/2018 0:00
8/1/2018 0:002                                             20,4905/1/2018 0:00
8/1/2018 0:002                                             45,6006/8/2018 0:00
8/1/2018 0:002                                             33,1207/15/2018 0:00
8/1/2018 0:002                                             27,3608/22/2018 0:00
8/1/2018 0:002                                             15,6009/1/2018 0:00
8/1/2018 0:002                                             46,20010/6/2018 0:00
8/1/2018 0:002                                             42,69011/13/2019 0:00
8/1/2018 0:002                                             36,48012/20/2018 0:00
9/1/2018 0:002                                               6,4801/1/2019 0:00
9/1/2018 0:002                                             64,7402/2/2019 0:00
9/1/2018 0:002                                             48,6503/13/2019 0:00
9/1/2018 0:002                                             45,6004/18/2018 0:00
9/1/2018 0:002                                             15,6003/25/2018 0:00
9/1/2018 0:002                                             38,8805/1/2018 0:00
9/1/2018 0:002                                             76,8106/8/2018 0:00
9/1/2018 0:002                                             36,4807/15/2018 0:00
9/1/2018 0:002                                               9,1208/22/2018 0:00
9/1/2018 0:002                                               1,9209/1/2018 0:00
9/1/2018 0:002                                             48,00010/6/2018 0:00
9/1/2018 0:002                                             59,17011/13/2019 0:00
9/1/2018 0:002                                             57,17012/20/2018 0:00
10/1/2018 0:002                                               6,4801/1/2019 0:00
10/1/2018 0:002                                             64,7402/2/2019 0:00
10/1/2018 0:002                                             48,6503/13/2019 0:00
10/1/2018 0:002                                             45,6004/18/2018 0:00
10/1/2018 0:002                                             15,6003/25/2018 0:00
10/1/2018 0:002                                             38,8805/1/2018 0:00
10/1/2018 0:002                                             54,9706/8/2018 0:00
10/1/2018 0:002                                             52,5607/15/2018 0:00
10/1/2018 0:002                                             27,3608/22/2018 0:00
10/1/2018 0:002                                             36,4809/1/2018 0:00
10/1/2018 0:002                                               9,12010/6/2018 0:00
10/1/2018 0:002                                               1,92011/13/2019 0:00
10/1/2018 0:002                                             41,00012/20/2018 0:00
8/1/2018 0:003                                               9,2101/1/2019 0:00
8/1/2018 0:003                                             54,9702/2/2019 0:00
8/1/2018 0:003                                             52,5603/13/2019 0:00
8/1/2018 0:003                                             27,3604/18/2018 0:00
8/1/2018 0:003                                             36,4803/25/2018 0:00
8/1/2018 0:003                                             20,4905/1/2018 0:00
8/1/2018 0:003                                             45,6006/8/2018 0:00
8/1/2018 0:003                                             33,1207/15/2018 0:00
8/1/2018 0:003                                             27,3608/22/2018 0:00
8/1/2018 0:003                                             15,6009/1/2018 0:00
8/1/2018 0:003                                             46,20010/6/2018 0:00
8/1/2018 0:003                                             42,69011/13/2019 0:00
8/1/2018 0:003                                             36,48012/20/2018 0:00
9/1/2018 0:003                                               6,4801/1/2019 0:00
9/1/2018 0:003                                             64,7402/2/2019 0:00
9/1/2018 0:003                                             48,6503/13/2019 0:00
9/1/2018 0:003                                             45,6004/18/2018 0:00
9/1/2018 0:003                                             15,6003/25/2018 0:00
9/1/2018 0:003                                             38,8805/1/2018 0:00
9/1/2018 0:003                                             76,8106/8/2018 0:00
9/1/2018 0:003                                             36,4807/15/2018 0:00
9/1/2018 0:003                                               9,1208/22/2018 0:00
9/1/2018 0:003                                               1,9209/1/2018 0:00
9/1/2018 0:003                                             48,00010/6/2018 0:00
9/1/2018 0:003                                             59,17011/13/2019 0:00
9/1/2018 0:003                                             57,17012/20/2018 0:00
10/1/2018 0:003                                               6,4801/1/2019 0:00
10/1/2018 0:003                                             64,7402/2/2019 0:00
10/1/2018 0:003                                             48,6503/13/2019 0:00
10/1/2018 0:003                                             45,6004/18/2018 0:00
10/1/2018 0:003                                             15,6003/25/2018 0:00
10/1/2018 0:003                                             38,8805/1/2018 0:00
10/1/2018 0:003                                             54,9706/8/2018 0:00
10/1/2018 0:003                                             52,5607/15/2018 0:00
10/1/2018 0:003                                             27,3608/22/2018 0:00
10/1/2018 0:003                                             36,4809/1/2018 0:00
10/1/2018 0:003                                               9,12010/6/2018 0:00
10/1/2018 0:003                                               1,92011/13/2019 0:00
10/1/2018 0:003                                             48,80012/20/2018 0:00

 




 

 

 

Anonymous
Not applicable

@v-danhe-msft 

Please find below the structure of current table:

SdateSdate YearSdate MonthEmployee IDActual Salary salary proposedSalary Difference
1/1/2019 0:0020191110000                     6,480      3,520 
2/2/2019 0:0020192115000     
3/13/2019 0:0020193117000     
4/18/2018 0:0020184118000    We are comparing the actual salary date to previous three months only
3/25/2018 0:0020183119000     
5/1/2018 0:0020185115000     
6/8/2018 0:0020186116000     
7/15/2018 0:0020187117500     
8/22/2018 0:0020188115600     
9/1/2018 0:0020189114700     
10/6/2018 0:00201810118000     
11/13/2019 0:00201811119000                  42,690  (23,690) 
12/20/2018 0:00201812121900                  59,170  (37,270) 
1/1/2019 0:0020191217500                  41,000  (23,500) 
2/2/2019 0:0020192215600     
3/13/2019 0:0020193214700     
4/18/2018 0:0020184218000     
3/25/2018 0:0020183219000     
5/1/2018 0:0020185215000     
6/8/2018 0:0020186216000     
7/15/2018 0:0020187217500     
8/22/2018 0:0020188217000     
9/1/2018 0:0020189218000     
10/6/2018 0:00201810219000     
11/13/2019 0:00201811215000                  36,480  (21,480) 
12/20/2018 0:00201812221344                  48,000  (26,656) 
1/1/2019 0:0020191319000                  48,800  (29,800) 
2/2/2019 0:0020192315000     
3/13/2019 0:0020193316000     
4/18/2018 0:0020184317500     
3/25/2018 0:0020183315600     
5/1/2018 0:0020185314700     
6/8/2018 0:0020186318000     
7/15/2018 0:0020187319000     
8/22/2018 0:0020188321900     
9/1/2018 0:0020189317500     
10/6/2018 0:00201810315600     
11/13/2019 0:00201811314700                  59,170  (44,470) 
12/20/2018 0:00201812318000                  57,170  (39,170) 




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.