Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

calculated column to measure

Hi I have a table and calculated column in power bi desktop looking like this:  calculation = CALCULATE(     AVERAGE(Table[value]),     ALLEXCEPT(Table,Table[category]) )   My intention...
  • Anonymous's avatar
    Anonymous
    1 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!