March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I'm trying to produce a graph showing a moving percentage based on the last number of items, as when I produced a graph based on the last period of time it had some very sharp edges (due to low production quantity over time)
The desired output graph is in the style as follows. So for a specific day it takes the last 10 items produced, counts how many items had a Defect (from the Defect column) and divides by the last 10 items to give a percentage with the defect
The data is as follows
I have a relationship between my Calendar and the Inspection Date column.
Defect Rate Last X =
VAR NoItems = 10
RETURN
DIVIDE(
CALCULATE(
COUNTX(
FILTER(
ALL('Calendar'),
[Date] <= MAX('Calendar'[Date])
),
COUNTX(
FILTER(
TOPN (NoItems, ALL('Inspections'[Defect],'Inspections'[Inspection Date]), Inspections[Inspection Date], DESC),
'Inspections'[Defect] = "Yes"
),
'Inspections'[Defect])
)
),
NoItems
)
Currently the output is as follows:
Thank you
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |