Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
Hi All
How do I modify this formula so that we're only averaging over days that have sales.
Average Sales 3 Month Rolling %:=
AVERAGEX(
DATESINPERIOD( 'Primary Date Table'[Date] , LASTDATE( 'Primary Date Table'[Date] ) , -3, MONTH ) , [Sales] )
Thanks
what's your rationale for doing that? Isn't that skewing the true performance numbers? What if it was a regular day but without sales?
Hi
I'm actually not using it for sales. I used Sales as a simpler way of explain it as most are familiar with it.
I'm calculating to exclude non-productive days. The average number of batches calculated over a 3 month period is being diluted and brought down by non-productive days (i.e the weekend). Sometimes we produce on weekends but if we took 90 days to calculate it for example, and everyday was productive, then it would make sense (the result might be an average of 85% because it's being diluted. But if we're dividing total no. of 'batches' and dividing it by the no. of productive days, say 90-12 (sundays) = 78, then the result would be higher, such as 92% (est) for example.
Use an external dates table where you can manually mark the days that had no batches. Then use that flag in your filters.
Hi, doesn't work:
Average Right First Time 3 Month Rolling %:=
VAR RFT =
CALCULATE (
[Right First Time %],
FILTER('Primary Date Table','Primary Date Table'[Batches (RFT)]>0)
)
RETURN
AVERAGEX( DATEADD('Primary Date Table'[Date],-3,MONTH)
,RFT)
It's not going back -3 months.
Try something like this:
Measure =
AVERAGEX (
FILTER (
DATESINPERIOD ( Dates[Date], LASTDATE ( Dates[Date] ), -3, MONTH ),
[Total Sales] > 0
),
[Total Sales]
)
@AntrikshSharma Hi, thank you for your reply. Sorry, I used sales as a decent example for the same formula but there's been no change when I apply to batches. Basically, when we have zero batches, I don't want to include that day in the 3 month calculation.
Average Right First Time 3 Month Rolling %:=
VAR BATCHES = [No. of Batches (RFT) Fail] + [No. of Batches (RFT) Pass]
RETURN
AVERAGEX(
FILTER(
DATESINPERIOD( 'Primary Date Table'[Date] , LASTDATE( 'Primary Date Table'[Date] ) , -3, MONTH ) ,
BATCHES >0
),
[Right First Time %]
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
14 | |
11 | |
8 |
User | Count |
---|---|
24 | |
19 | |
12 | |
11 | |
10 |