Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DAX Query

Hi All,

 

I have a data set similar to the below example. 

 

On Hire DateOff Hire DateHire Duration (Days)
01/01/202010/01/202010
02/01/202010/01/20209

 

I want to create a DAX formula that will show me any rows that are above 10 days for instance.

Please can anyone help?

 

Many thanks,

 

E

  • Hi Anonymous ,

     

    You could follow the way of camargos88 to filter out in filter pane. Or you could use a IF function to implement it.

     

    Please try this:

    Measure = 
    var diff = DATEDIFF(MAX('Table'[On Hire Date]),MAX('Table'[Off Hire Date]),DAY)+1
    return
    IF(diff>=10, diff)

     

     

3 Replies