Forum Discussion
calculated column to measure
Hi
I have a table and calculated column in power bi desktop looking like this:
Thank you in advance!
- Anonymous1 year ago
Hi Anonymous ,
Thank you pankajnamekar25 for the helpfu response!
Yes, you can achieve this using a measure instead of a calculated column. The measure will dynamically calculate the average value per category and adjust based on any filters applied in your report.
Please use the below DAX :CalculationMeasure =CALCULATE(AVERAGE('Table'[Value]),ALLEXCEPT('Table', 'Table'[Category]),VALUES('Table'[Category]))
Attaching the pbix and the screenshot for your reference.
I hope this helps.If so,kindly accept it as a solution.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
3 Replies
- AnonymousNot applicable
Hi Anonymous ,
Thank you pankajnamekar25 for the helpfu response!
Yes, you can achieve this using a measure instead of a calculated column. The measure will dynamically calculate the average value per category and adjust based on any filters applied in your report.
Please use the below DAX :CalculationMeasure =CALCULATE(AVERAGE('Table'[Value]),ALLEXCEPT('Table', 'Table'[Category]),VALUES('Table'[Category]))
Attaching the pbix and the screenshot for your reference.
I hope this helps.If so,kindly accept it as a solution.
Thank you for being a valued member of the Microsoft Fabric Community Forum! - pankajnamekar25
Super User
Hello Anonymous ,
You can try
CalculationMeasure =
CALCULATE(
AVERAGE(Table[value]),
ALLEXCEPT(Table, Table[category])
)same as measure it will work.
Thanks,
PankajIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
- AnonymousNot applicable
if I try the same for measure then my visual looks like this: