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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
syazwan95
Frequent Visitor

How to find average for multiple data in a day?

Greetings all,

 

Please refer the image that I've attached. I'm extracting data from my company's database, and it works such that it will record multiple readings from the source on the same day. I'm trying to find a way such that I can average these data and only show one value for that day (averaged value).

 

In the image, you can see that I have multiple data for 31/3/2019. I just want to find its average on that day and only show one value. I would like to do the same for other dates as well.

 

Anyone knows how I can do this through DAX/calculated column/Measure?

 

POWER BI attachment.PNG

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi @syazwan95 ,

Actually, neither measure nor calculated column can only show one value for that day directly, for calculated column, it will display the average data for each day on each row.

In this scenario, we can use the Matrix visual to display it.

First we can create a calculated column using the following DAX query:

Column = CALCULATE(AVERAGE(Table1[IP_trend_Value]),FILTER(ALL(Table1),Table1[IP_TREND_time] = EARLIER(Table1[IP_TREND_time])))

Then refer to this blog to display it: https://data-flair.training/blogs/power-bi-matrix-visual/

Best Regards,

Teige

View solution in original post

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @syazwan95 ,

Actually, neither measure nor calculated column can only show one value for that day directly, for calculated column, it will display the average data for each day on each row.

In this scenario, we can use the Matrix visual to display it.

First we can create a calculated column using the following DAX query:

Column = CALCULATE(AVERAGE(Table1[IP_trend_Value]),FILTER(ALL(Table1),Table1[IP_TREND_time] = EARLIER(Table1[IP_TREND_time])))

Then refer to this blog to display it: https://data-flair.training/blogs/power-bi-matrix-visual/

Best Regards,

Teige

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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