Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
So i have a dataset with days to deliver a product that goes like this
Note: An order with DaysToDeliver = 0 means that it was delivered on the same day of purchase, whereas DaysToDeliver = NULL means that it wasn't delivered.
| ItemID | OrderStatus | DateDelivered | DaysToDeliver | -------------------------------------------------------- | 12145 | canceled | null | null | | 12145 | delivered | 2019-02-01 | 0 | | 12145 | delivered | 2019-02-01 | 1 | | 12145 | delivered | 2019-02-01 | 1 | | 12145 | delivered | 2019-02-01 | 3 |
I need to calculate the percentile 80 by Date Selected ( shown by days, week, month ), but i think im not using the proper formula for calculating the percentile.
I've used the following formulas and got different results with each of them:
FORMULA 1
P80. Leadtime = CALCULATE( PERCENTILEX.INC( FILTER( 'LogisticsDB', 'LogisticsDB'[DaysToDeliver] <> BLANK() ) ,'LogisticsDB'[DaysToDeliver] , 0.80 ) ,USERELATIONSHIP( Calendar[Date] ,'LogisticsDB'[DateDelivered] ) )
FORMULA 2
P80. Leadtime = CALCULATE( PERCENTILE.INC( 'LogisticsDB'[DaysToDeliver] ,0.80 ) ,FILTER( 'LogisticsDB' ,'LogisticsDB'[DaysToDeliver] <> BLANK() ) ,USERELATIONSHIP( Calendar[Date] ,'LogisticsDB'[DateDelivered] ) )
FORMULA 3
P80. Leadtime = CALCULATE( PERCENTILE.INC( 'LogisticsDB'[DaysToDeliver] ,0.80 ) ,FILTER( 'LogisticsDB' ,'LogisticsDB'[DaysToDeliver] >= 0 ) ,USERELATIONSHIP( Calendar[Date] ,'LogisticsDB'[DateDelivered] ) )
Ok, apparently this formula does the job. Still if you guys think there is a better way, im open for discussion.
Hi @Anonymous,
There could be other ways. But your formula is quite simple.
Best Regards,
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.