Forum Discussion
Calculate the average
Great question. You might need to do a little redesign for this to be the most performant. Here is what I would do.
You can use DAX to calculate the average time taken to replace a specific part number in your spreadsheet. Here's an example measure that you can create in Power BI or Excel:
AvgTimeToReplace =
AVERAGEX(
FILTER('Table', 'Table'[Part Number] = "9001"),
'Table'[Working Hours])
In this measure, "Table" refers to the name of your table in Power BI or Excel. The FILTER function filters the table to only include rows where the Part Number is "9001", and the AVERAGEX function calculates the average of the Working Hours for these rows.
You can then display this measure in a table or chart alongside other relevant data.
You can modify this by adding a variable for 9001 where the user selected the part number from a slicer and it updates the measure for the average of that part.
Thanks for letting me help! If you found my response useful, please give me a thumbs up and consider visiting aimeetsanalytics.com for more insights and tips on data analytics.