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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
MCassady
Helper I
Helper I

Help Getting Average of Minimum Daily Values for Specified Month

Hello,

 

I am trying to do a calculation which is the AVERAGE of the MIN temperature values by DAY in the month.

 

For example, if a user picks 2022/10/20 in the slicer, the measure must go and grab the last 5 years worth of data, for every day in october, calculate the daily MIN for each day, then return the AVERAGE of those values for use on a line chart.

 

I have included a sample below. The measure I was working with is called Temperature - 5Year Average Daily Min.

PBIX:
https://drive.google.com/file/d/1FF_VLnHGGfUNDfD-ODQ40OiOAmqpcYBC/view?usp=share_link

The results of the measure are expected to be the below values:

10.32022-10-01
10.362022-10-02
10.662022-10-03
10.922022-10-04
9.562022-10-05
12.622022-10-06
13.642022-10-07
12.322022-10-08
12.722022-10-09
14.342022-10-10
11.382022-10-11
9.622022-10-12
10.962022-10-13
10.262022-10-14
8.922022-10-15
6.962022-10-16
6.182022-10-17
6.882022-10-18
6.762022-10-19
8.22022-10-20
8.42022-10-21
8.442022-10-22
8.982022-10-23
6.242022-10-24
5.122022-10-25
4.542022-10-26
6.462022-10-27
5.92022-10-28
6.162022-10-29
4.382022-10-30
5.12022-10-31

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@MCassady , You can use a measure like this which will sum above the day level.

 

sumx(Values(Table[Date]), calculate(Min(Table[Value])) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
MCassady
Helper I
Helper I

I figured out what was wrong. I was accidentally including the current year in my "Previous 5 years average".

Just me not being careful enough.

amitchandak
Super User
Super User

@MCassady , You can use a measure like this which will sum above the day level.

 

sumx(Values(Table[Date]), calculate(Min(Table[Value])) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hey @amitchandak 

 

I am trying something like this in my measure as seen in the example file.  Although I am using averagex instead of sumx because I am looking for the average.  

 

I am also using some extra filters that the other working measure is using. 

 

I am not getting my expected results still. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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