Forum Discussion
PaulMcDk
5 years agoFrequent Visitor
Average cost with distinctcount
Dear community, it's my very first post and i'm quite beginner to this Power BI . I'm slowly building up a model with Price - Mix - Volume effect and i have two tables , 1 for actual data and...
- Anonymous5 years ago
// If you want the average actual cost // per trip in a given country averaged ///across different countries, then: AVG Actual Cost = AVERAGEX( DISTINCT( 'Actual Data'[Tax Country Departure] ), // This DIVIDE gives you the average cost of // a trip in the currently iterated // Country of Departure and the AVERAGEX // makes sure that you average these averages // over all visible countries of departure. DIVIDE( [ACT cost], [Trip Count] ) )
jthomson
Solution Sage
5 years agoI'm struggling to see why simply divide([ACT cost],[Count Trip]) wouldn't work
PaulMcDk
5 years agoFrequent Visitor
nice question 🙂 i guess it is doing the average not by the COUNT TRIP but considering the total items present in the table .
For 1 trip i can have more than a line cost .