Forum Discussion

cghanta's avatar
cghanta
Helper I
1 year ago
Solved

Average Calculation

I have a table UPS and a column Age   The Power BI has a slicer based on column location I want to find Average Age from the column Age, ignoring the slicer and display the measure in the report...
  • mdaatifraza5556's avatar
    1 year ago

    Hi cghanta 

    Can you please try the below DAX.

    CALCULATE(
    AVERAGE(UPS[Age for Avg]),
    ALL(UPS[Location]), 
    UPS[Age for Avg] <> 0
    )


     




    If this answers your question, kindly mark it as the solution.

  • xifeng_L's avatar
    1 year ago

    Hi cghanta 

     

    You also can try below measure:

     

    CALCULATE(AVERAGE(UPS[Age Avg]),FILTER(ALL(UPS), UPS[Age for Dual UPS Avg] <> 0))

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~

  • cghanta's avatar
    cghanta
    1 year ago

    Both the solutions from xifeng_L and mdaatifraza5556 worked, Thank you both.
    I am not sure how to select both the replies as accepted solution