Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

DAX function

Hello, I'm relatively new to Power BI. Need help with median and standard deviation DAX functions (MEDIAN and

STDEV.P)

Both accept only reference to a column. I need to use MEASURE which is monthly TOTALs . Need to show on line chart monthly totals over a period of 2 years along with Median and Stand. deviation. Your help is much appreciated!!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you so much for your response. Not sure how to apply your formulla   to my case. I've created a measure:

Total Inpatient Orders = CALCULATE(COUNTROWS(distinct(OPIOIDS[IDcode])), FILTER (OPIOIDS,OPIOIDS[IsGiven] = 1))

I got a perfect monthly linechart for a few years that shows montly Total Inpatient Orders. Now need to apply MEDIAN and Standard Deviation to this chart. Any suggestions?

Thanks again

View solution in original post

5 REPLIES 5
JasonTX
Resolver I
Resolver I

If understand correctly, you want to find Standard deviation and median grouped by monthly totals. You may want to create a Summarize or Summarize Column.

 

It should look something like:

 

STDEVX.P(
  SUMMARIZE(
       [Table],
       'Table'[Date].[Month],
        "Total", Sum([Sales])
        ),
   [Total]
)

 

Please let me know if this works. 

 

Regards

Anonymous
Not applicable

Thank you so much for your response. Not sure how to apply your formulla   to my case. I've created a measure:

Total Inpatient Orders = CALCULATE(COUNTROWS(distinct(OPIOIDS[IDcode])), FILTER (OPIOIDS,OPIOIDS[IsGiven] = 1))

I got a perfect monthly linechart for a few years that shows montly Total Inpatient Orders. Now need to apply MEDIAN and Standard Deviation to this chart. Any suggestions?

Thanks again

Replace SUM(Sales) with [Total Inpatient Orders] and 'Table'[Date] with whatever date column you are using.

 

Hope that helps 😁

Anonymous
Not applicable

Thank you so much. I was able to create a stand. dev. measure. But when I try to place it into Values on my chart, I see the 'hour glass' sign for long, and never finishes. Like Cortesian product in Transact SQL. Any idea?

Thank you

Anonymous
Not applicable

Never mind. I;ve found the issue. My mistake. Thank you

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.