- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

BUG: Unable to convert value #date(2022, 9, 26) to type Number
Good morning
I consult, I want to make dynamic this restriction in the Date field (this as Date / time)
each [FECHA] >=
#datetime(2022, 3, 1, 0, 0, 0))
each [FECHA] >=
#date(Date.AddDays(DateTime.Date(DateTime.LocalNow()), -30), 0, 0))
Porbe in this way but I the following error:
Expression.Error: Unable to convert the value #date(2022, 9, 26) to the Number type.
Details:
Value=26/9/2022
Type=[Type]
Thanks a lot.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

If you don't need the time part of the [FECHA] column then you could convert it to a Date type before you execute this step. If you do need the time part you could use
each [FECHA] >=
DateTime.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), -30))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

If you don't need the time part of the [FECHA] column then you could convert it to a Date type before you execute this step. If you do need the time part you could use
each [FECHA] >=
DateTime.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), -30))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This option worked correctly.
Thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Try
each [FECHA] >=
Date.AddDays(DateTime.Date(DateTime.LocalNow()), -30)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Try and give the following error:
Expression.Error: Unable to apply the < operator to the Date and DateTime types.
Details:
Operator=<
Left=26/9/2022
Right=1/1/2022 00:00:00

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
07-10-2024 10:42 AM | |||
03-12-2024 11:57 PM | |||
10-12-2023 12:31 AM | |||
10-16-2024 08:19 AM | |||
08-12-2024 10:10 PM |
User | Count |
---|---|
85 | |
78 | |
41 | |
40 | |
35 |