Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.