Forum Discussion

shantupm5's avatar
shantupm5
Helper III
3 years ago

MedianX Function

Hello,

 

I have the below data which is outcome of a Measure, And i want to derive Median of this outcome. I used formula

 

=CALCULATE(MEDIANX(VALUES('Customer[Customer]),[Achi %])) and i get the Medain as 3.84%.
How ever when i compute the same data in excel sheet and use fomula =MEDIAN(J7:J12), i get the Median value as 61%.

Please can you let me know what is accurate and right way of calculating the Median Value?

 

 

 

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi shantupm5 ,

    You can update the formula of your measure as below and check if it can return the correct result...

    Median = CALCULATE(MEDIAN('Customer'[Achi %]),ALLSELECTED('Customer'))

    If the above one can't help you, please provide some raw data in your table 'Customer' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

    How to provide sample data in the Power BI Forum

     

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards

    • shantupm5's avatar
      shantupm5
      Helper III

      Hello,

       

      The Customer Achi% in my question is output of measure, hence i am not able to apply the above solution. Please advice

       

      Regards
      Prashanth

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi shantupm5 ,

        Please update the formula of measure as below and check if it can return the correct result...

        Median = MEDIANX(ALLSELECTED('Customer'),[Achi %])

        If the above one can't help you, please provide more raw data in your table 'Customer' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

        How to provide sample data in the Power BI Forum

         

        And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

        How to upload PBI in Community

        Best Regards