The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to calculate a running total of a measure that calculates a division. What I would like to have is what is shown in the table below.
NumberFailures is a basically a count when another column is not blank
NumberFailures=calculate( count(DataFailure[Part]); DataFailure[PartOperationalEnd] <> BLANK())
NumberParts comes from another table where the total number of parts per year are summarized.
NumberParts = sum(NoParts[NoParts])
So the FailureRate would be:
FailureRate =( NumberFailures/sum(NoParts[NoParts]))*100
What I would like to have is a running average, to do so I'm trying to calculate first the running total of the FailureRate and then divide with the year number. For the running total I'm trying the solution suggested here .
AccumFailureRate =
VAR Age = SELECTEDVALUE( NoParts[Year]; 0 )
RETURN
SUMX( FILTER(
SUMMARIZE( NoWTG; NoWTG[Year];
"FailureRate"; ([NumberFailures]/sum(NoParts[NoParts])*100));
NoParts[Year] <= Age );
[FailureRate] )
However, I'm getting the results for all the data and not for the selections of the slicers. I understand it's because of the summarize that I'm aggregating for year, but I don't know how the calculation I need could be done.
Thank you!
Finally, in the non sample data I have two more filters, also neither of them is taken into account when calculating the cummulative total
Solved! Go to Solution.
Too complex not to have to recreate this. I don't see what I would expect where you would have an ALL or something that would be removing the slicer filter context.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
I realized that i had to add an allselected
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |