The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I wanted to seek inputs from here. Basically I wanted to calculate the average sales of employees between their start and end date then show it in a matrix with Employee name in rows and their averages sales in years as columns.
Here is my sample dataset.
Employee Name | Sales | Start | End |
John Doe | 598 | 1/1/2020 | 6/1/2020 |
Sarah | 600 | 1/1/2019 | 12/31/2019 |
Sarah | 1000 | 1/1/2019 | 12/31/2019 |
Barry | 500 | 1/1/2019 | 6/1/2019 |
Barry | 300 | 1/1/2019 | 6/1/2019 |
Ivan | 200 | 1/1/2018 | 12/1/2018 |
Ivan | 500 | 1/1/2018 | 12/1/2018 |
Scott | 300 | 1/1/2018 | 6/1/2018 |
My expected output should be like:
Employee Name | 2018 | 2019 | 2020 |
John Doe | 598 | ||
Sarah | 800 | ||
Barry | 400 | ||
Ivan | 350 | ||
Scott | 300 |
Solved! Go to Solution.
Finally able to solve this by following this video: https://www.youtube.com/watch?v=ezGQ1YxfAOU&list=RDCMUC-h-wArcxJC8zBOD-UxfCOg&index=2
Finally able to solve this by following this video: https://www.youtube.com/watch?v=ezGQ1YxfAOU&list=RDCMUC-h-wArcxJC8zBOD-UxfCOg&index=2
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |