Forum Discussion
PBR_
3 years agoFrequent Visitor
PowerBI Dax Fill Rate Percentage
I'm trying to get a fill rate (%) formula that calculates the fill rate based on entry Status, and is dynamic (i.e., the calculation will update depending on what filters are selected within PowerBI,...
- 3 years ago
PBR_, like this?
Rate = VAR _unfill = COUNTX ( FILTER ( data, LEFT( [Status], 6 ) = "Unfill" ), [Status] ) VAR _fill = COUNTX ( FILTER ( data, LEFT( [Status], 4 ) = "Fill" ), [Status] ) RETURN DIVIDE ( _fill, _unfill )Best Regards,
Alexander
barritown
Solution Sage
3 years agoHi PBR_,
You might have provided a wrong value for the fill rate on entire data sample ( 5 / 11 -> 45% ).
If that's the case, please try such a measure:
In plain text:
Rate =
VAR _total = COUNT ( data[Status] )
VAR _fill = COUNTX ( FILTER ( data, LEFT( [Status], 4 ) = "Fill" ), [Status] )
RETURN DIVIDE ( _fill, _total )Best Regards,
Alexander
PBR_
3 years agoFrequent Visitor
Thanks, Alexander
Sorry - to clarify, the fill rate should only inlcude the Fill* vs Unfill statuses (i.e., the Request, Pending, and Cancel statuses should be removed from the fill rate).