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
shakobe1
Frequent Visitor

Average sales for time period ??

I'm trying to returnt the avearage sales qty for this time period and cant seem to find the results I'm looking for any suggestions on how to retuen the average??
 
SKU sales total (Date 1) =
VAR startdate = CALCULATE(min('Date'[Calendar Date]),ALL('Independent Date'))
VAR enddate = CALCULATE(MAX('Date'[Calendar Date]),ALL('Independent Date'))
return
CALCULATE('Measure Table'[Sales Line Quantity], ALL('Independent Date'[Calendar Date]), DATESBETWEEN('Independent Date'[Calendar Date],startdate,enddate))
1 ACCEPTED SOLUTION

Hi @shakobe1 ,

 

Average() you're missing one over there")"

 

Best Regards,

Yolo Zhu

 

 

View solution in original post

4 REPLIES 4
shakobe1
Frequent Visitor

Screenshot 2022-12-01 090111.jpg

Hi @shakobe1 ,

 

Average() you're missing one over there")"

 

Best Regards,

Yolo Zhu

 

 

v-xinruzhu-msft
Community Support
Community Support

Hi @shakobe1 ,

 

You can try the following code I modified:

 

SKU sales total (Date 1) =

VAR startdate = CALCULATE(min('Date'[Calendar Date]),ALL('Independent Date'))

VAR enddate = CALCULATE(MAX('Date'[Calendar Date]),ALL('Independent Date'))

return

CALCULATE(Average('Measure Table'[Sales Line Quantity]), ALL('Independent Date'[Calendar Date]), DATESBETWEEN('Independent Date'[Calendar Date],startdate,enddate))

 

If the above code does not meet your requirements, can you provide some test data and sample expected results?

 

 Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yolo! unfortunately it dodnt work. I attached a screen shot

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.

Top Solution Authors