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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rezaaditia
Helper III
Helper III

calculate average daily of last week

Hi –

 

I believe this will be easy for you guys, but its quite difficult for me…J

 

Anyway, I have big data , inside that big data, I have 2 columns for:

  • Validate source => filled with (inflow, outflow, backlog and false)
  • Weeknum

 

Based on this 2 column, can you please share how to calculate average daily of last week (Monday to Friday) of inflow, outflow and backlog

 

Thanks

1 ACCEPTED SOLUTION

Hi -

 

finally found the answer 

 

Measure3 = (CALCULATE(COUNT(Sheet1[validate source3])))/(CALCULATE(DISTINCTCOUNT(Sheet1[validate_date].[Date])~FILTER(Sheet1~Sheet1[Week])))

View solution in original post

5 REPLIES 5
RobbeVL
Impactful Individual
Impactful Individual

Hi There,

 

To have a fast and easy answer to this question, please provide some sample data.

This will be easier for you and easier for people creating your solution.

 

Robbe

Hi -

 

sorry, was busy with my works.

please see sample file in gdrive... 

https://drive.google.com/open?id=1AQoHnI-hoysQNTKJtuI8iPBZYoN9FXiH

 

in this sample pbix, i've created weekly trend of previous weeks,

now based on this i want to get daily average of last week.

 

hope this is sample is enough.

 

thanks

RobbeVL
Impactful Individual
Impactful Individual

If I understand your request correctly, this is What I added:

first I added a Column With the Day of the week: 

Weekday = WEEKDAY(Sheet1[validate_date];2)

Then I calculated the average for weekdays:

avg = CALCULATE(COUNT(Sheet1[key]), Sheet1[Weekday] <6, Sheet1[Week]= WEEKNUM(TODAY())-1) /5

Now you have a measure that calculates The average count per day for last weeks workdays.

 

Hope this helps!

Hi @RobbeVL 

 

thanks for your response, but your formula is not as per my expecation (please see chart #2 for result of using your formula given). 

Might be i am not giving you clear request.

 

Capture.JPG

 

in first chart, it show total of inflow and outflow of the week (for monday and friday).

now using same chart, i want to have average of total inflow and outflow per week.

below if i create in excel

 

Capture.JPGT

 

Thanks

Hi -

 

finally found the answer 

 

Measure3 = (CALCULATE(COUNT(Sheet1[validate source3])))/(CALCULATE(DISTINCTCOUNT(Sheet1[validate_date].[Date])~FILTER(Sheet1~Sheet1[Week])))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.