Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I want to get all the ID base on Register_datetime and Expire_datetime within 1 day. I tried the DATEDIFF function but it doesn't work like the photo below
Can anyone help me? Thanks
Example:
Solved! Go to Solution.
You need to return 1 value (instead of just filtering a table, which returns multiple lines) - instead of using FILTER... Try:
IF(DATEDIFF(... etc.) <= 1, 1, BLANK().
That returns 1 when the DATEDIFF condition is True, and then you can use that as a filter.
@JennyMilf , if you creating a column, you should be able to use
DATEDIFF([Date1], [Date2], day)
If you are creating a measure then try like
countrows(filter(Table, DATEDIFF([Date1], [Date2], day) <=1) )
thank you, it's work!
Thank you for responding, But it seems like I can not use the DATEDIFF function and I don't know why. Do you have any idea?
@JennyMilf , if you creating a column, you should be able to use
DATEDIFF([Date1], [Date2], day)
If you are creating a measure then try like
countrows(filter(Table, DATEDIFF([Date1], [Date2], day) <=1) )
You need to return 1 value (instead of just filtering a table, which returns multiple lines) - instead of using FILTER... Try:
IF(DATEDIFF(... etc.) <= 1, 1, BLANK().
That returns 1 when the DATEDIFF condition is True, and then you can use that as a filter.
User | Count |
---|---|
94 | |
86 | |
78 | |
69 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |