Fabric is Generally Available. Browse Fabric Presentations. Work
towards your Fabric certification with the Cloud Skills Challenge.
I have the following dataset:
Problem 1: How do I find the AVERAGE [visits] number for DISTINCT employee_Ids?
- Output is a measure with the number 21 in this example, since the calculation is (12+21+30) divided by 3.
- [visits] is always the same number per employee_id, so I need to somehow get DISTINCT employee_ids before I find the average.
Problem 2: How do I find the AVERAGE [slices] for each month in the [date] column for each employee_id?
- Output is a measure with the number 2,9 since the calculation is (1,25+2,5+3,5+5+2,25) divided by 5.
Go to Solution.
Please check the below measures and the attached pbix file.
Problem 1 measure: =
AVERAGEX ( SUMMARIZE ( Data, Data[employee_id], Data[visits] ), Data[visits] )
Problem 2 measure: =
ADDCOLUMNS ( Data, "@month", MONTH ( Data[months] ) ),
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
View solution in original post
Check out the November 2023 Power BI update to learn about new features.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.