Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Count Filtered by DatesBetween

$
0
0

Hello!

 

Very new to this, not a great deal of DAX experience but some basic java/c#!

 

Im trying to analyse delivery on time data, i can see the % of on time deliveries (for all of time) with this formula

 

Average Year = COUNT (Delivery[Delivered on Time])/(COUNT (Delivery[1-3 Days Late])+COUNT(Delivery[4-7 Days Late])+COUNT(Delivery[8-14 Days Late])+COUNT(Delivery[15-30 Days Late])+COUNT(Delivery[30+ Days Late]) +COUNT(Delivery[Delivered on Time]))

 

 

I would like to do it for a month, or three months, so i tried this horrible formula

 

Average Month = (IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT(Delivery[Delivered on Time]),0)/
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT (Delivery[1-3 Days Late]),0)+
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT (Delivery[1-3 Days Late]),0)+
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT(Delivery[4-7 Days Late]),0)+
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT(Delivery[8-14 Days Late]),0)+
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT(Delivery[15-30 Days Late]),0)+
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT(Delivery[30+ Days Late]),0) +
(IF(DATESBETWEEN('Delivery'[1.Date Sent],10/2016,11/2016),COUNT(Delivery[Delivered on Time]),0))

 

 

Is it just me or do some DAX functions not wok in Power Bi?

 

Thanks in advance!


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>