Cookie
Cookie

Reputation: 63

PBI DAX multiple if and Average exclude blank and zero

I have a PBI DAX situation where I want to calculate the Average Working Days with 2 IF criteria....
(a) if the status = completed and (b) if the job state <> Cancelled

Also need the average calculation to exclude all blanks and zeros

Do I have to add a new column to calculate the working days i.e. (actual finish minus actual start) for each row first and then create the Measure? Is there a way to do this altogether in the Measure?

thanks for sharing ideas

Upvotes: 0

Views: 512

Answers (1)

j.p
j.p

Reputation: 106

Average_days = AVERAGEX(FILTER('Table', 'Table'[status]="Complete"), DATEDIFF(AVERAGE('Table'[start_date]), AVERAGE('Table'[end_date]), MINUTE)/(60*24))`

Upvotes: 0

Related Questions