Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Using a measure in a calculated column

Hi Everyonne, 

It's my first time using the platform please be gentle 🙂

 

I need some help using a measures in a calculated column.

 

I have 2 measures that calculate the average marks and standard deviation for student marks. I need to be able to a standard score per student calc: Standard score = (Marks - Average)/StandardDeviation.

 

My challenge is that I need the measures in the calculated to dynamically change based on the slicers. For instance if I have selected English for Grade 4 school X. I need the standard to be  calculated based on that criteria and not my entire population.

 

TIA

HopeM

4 Replies

  • Anonymous , You can not use a measure in a calculated column or you can not use slicer values in a calculated column. You have to create a new measure only.

     

    You can use sumx, minx, kind of function to push calculation at desired level

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Anonymous ,

     

    Welcome to community.

     

    Rather than creating a new column for Standard score, you can still create it as a DAX measure and use it anywhere in table or whereever you want. If you do like that whatever filter you apply dynamically the column also gets calculated automatically.

     

    Let me know if I didn't understood your question properly.

     

    Thanks,

    Karthik

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Karthik, 

      Thanks for your response. 

       

      I need to standard score per student based on the grade, subject... If I do this as a measure I need to aggreated this which doesn't work as desired

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      This is the sample data and calculation in excel