Forum Discussion
Calculate the average
Do you require having it as a new column in our model? If not I would create a measure:
Mesaure =
AVERAGEX(
FILTER('Table', 'Table'[Part Number] = SelectedValue(Part Number)),
'Table'[Working Hours])
Then add that measure to your visuals in Power BI where you want to display the average. You could create a table visual and use that measure as a column in that table. That way you aren't storing more data in your model as you would if you used a calculated column.
At the top of the page just add a filter for the part number. Then you can drop down the filter, select the part number and see the average time to replace that part. You could filter it by mechanic, days of week, or whatever perspectives needed. I just used a single part number for the example. Using SelectedValue(Part Number) will do the calcualtion for whatever part number you select.
- Beto_Zambom3 years agoFrequent Visitor
Not sure if I did the DAX correctly.
Measure = AVERAGEX(FILTER(claim_export,claim_export[article_numbers]=SELECTEDVALUE(claim_export[article_numbers])),claim_export[quantity])Where:Claim_export is the name of my Table.Article_Numbers is where the part number and the code for working hours are located.Quantity is the amount of hours or amount of the parts have been usedJob Number Article_Number Qty 1340 90081639.1 1 1340 1111118 2 2291 90081639.1 1 2291 1111118 2 2623 90081639.1 1 2623 1111118 3 3543 90081639.1 1 3543 1111118 3