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.
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.
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |