Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ceciliatc
New Member

parametros

hola

 

estoy intentando crear un parametro con fechas pero me sale este error, alguien sabe q estoy haciendo mal?

 

ceciliatc_1-1725574429885.png

 

1 ACCEPTED SOLUTION

couple things:

 

- Use DateTime.From([Date])   - RangeStart and RangeEnd are already in the right format.

- What's the 0 supposed to do?  Drop that

- Only one of the parameters can be inclusive, usually RangeStart.  Make RangeEnd exclusive.

 

RangeStart <= DateTime.From([Date]) and DateTime.From([Date] < RangeEnd

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @ceciliatc 

 

This error is because you are comparing data of type DateTime and DateTimeZone.

As lbendlin mentioned, you can use DateTime.From() function to convert DateTimeZone to DateTime type, moreover, you can also use DateTimeZone.RemoveZone() function to remove the time zone information of DateTimeZone, try the following code:

= Table.SelectRows(#"Changed Type", each DateTimeZone.RemoveZone([Date]) >= RangeStart and DateTimeZone.RemoveZone([Date]) <= RangeEnd)

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Use DateTime.From( )  to make the data types match.

now I am getting this

ceciliatc_0-1725581983650.png

 

couple things:

 

- Use DateTime.From([Date])   - RangeStart and RangeEnd are already in the right format.

- What's the 0 supposed to do?  Drop that

- Only one of the parameters can be inclusive, usually RangeStart.  Make RangeEnd exclusive.

 

RangeStart <= DateTime.From([Date]) and DateTime.From([Date] < RangeEnd

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.