Forum Discussion

Jorgast's avatar
Jorgast
Resolver II
4 years ago

Historical Agent Reporting

Hello Power BI Friends

I am trying to work on historical agent performance based on their role at that time. Due to the nature of the data, I am unable to share exact information, but I can provide an example. I am sure there is a way to do this in Power BI but I am not sure how. can you help?

I have 4 tables:

 

  • Date
  • Agent Sales
  • Current Employee Roster
  • Historical employee roster

 

Joins are as follows

  • Date [Date] -> Agent Sales [Date of Sale]
  • Date [Date] -> Historical employee roster[Effective Date]
  • Current Employee Roster -> Agent Sales [ID]
  • Current Employee Roster -> Historical employee roster[ID Number]

What I want to be able to do:

Show the historical sales data which includes their position at that time, based on the date slicer.

 

CURRENT   
NamePositionEffective DateID Number
Agent 1Service Agent 11/1/2021123
Agent 1Service Agent 26/6/2021123
Agent 1Sales Agent 19/9/2021123
Agent 2Service Agent 112/1/2020234
Agent 2Service Agent 25/1/2021234
Agent 2Service Agent 311/1/2021234
Agent 3Service Agent 22/1/2021345
Agent 3Sales Agent 18/1/2021345
Agent 3Sales Agent 210/1/2021345

 

HISTORICAL   
NamePositionEffective DateID Numberis Current
Agent 1Service Agent 11/1/2021123NO
Agent 1Service Agent 26/6/2021123NO
Agent 1Sales Agent 19/9/2021123YES
Agent 2Service Agent 112/1/2020234NO
Agent 2Service Agent 25/1/2021234NO
Agent 2Service Agent 311/1/2021234YES
Agent 3Service Agent 22/1/2021345NO
Agent 3Sales Agent 18/1/2021345NO
Agent 3Sales Agent 210/1/2021345YES

 

SALES   
NameID NumberDate of SaleAmount
Agent 11239/1/2021100
Agent 112310/1/2021200
Agent 112311/1/2021150
Agent 33458/1/2021400
Agent 33459/1/2021100
Agent 334510/1/2021

200

 

SLICER9/1/202110/1/2021  
OUTPUT    
NamePositionEffective DateID NumberSales
Agent 1Sales Agent 19/9/2021123300
Agent 3Sales Agent 18/1/2021345100
Agent 3Sales Agent 210/1/2021345200

2 Replies

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi Jorgast ,

    What the relationship between 'Sale' [Date] and  HISTORICAL[Effective Date]?

     

     

    Best Regards

    Lucien

    • Jorgast's avatar
      Jorgast
      Resolver II

      Currently, there is no relationship between the Sales table and the historical table