Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I would like to create an average value from a filtered set of rows, where the value in another field = "Boats".
i.e. I have all the amounts in one column, but some of these are for (e.g.) planes, some for boats, some for cars. And the vehicle type is recorded in another column. So looking to create an average for each vehicle type.
E.g. BoatAverageAmount = average of the amount field in rows where vehicletype = "Boat".
Would this be a column or a measure? And what would be the DAX?
Thanks for your help.
Solved! Go to Solution.
=CALCULATE(AVERAGE(Table[Amount]),Table[Vehicle Type]="Boat")
create calculated column, please try this
new column=AVERAGEX(FILTER(Table,Table[Vehicle Type]="Boat"),Table[Amount])
=CALCULATE(AVERAGE(Table[Amount]),Table[Vehicle Type]="Boat")
Thanks! I get an error when trying to use this formula in a column for each vehicle average ('A circular dependency was detected') but it seems to work fine as a measure.
create calculated column, please try this
new column=AVERAGEX(FILTER(Table,Table[Vehicle Type]="Boat"),Table[Amount])
That works perfectly, thanks!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |