Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have a data set similar to the below example.
On Hire Date | Off Hire Date | Hire Duration (Days) |
01/01/2020 | 10/01/2020 | 10 |
02/01/2020 | 10/01/2020 | 9 |
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
Solved! Go to Solution.
Hi @Serdet ,
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)
Hi @Serdet ,
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)
@Serdet , refer if this can help
or datediff([On Hire Date],[Off Hire Date],day)+1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
103 | |
102 | |
87 | |
73 | |
67 |
User | Count |
---|---|
119 | |
111 | |
95 | |
79 | |
72 |