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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MyPowerbi2020
Helper IV
Helper IV

Please explain the result

I was trying to filter out a date table based on a given date , here : DATE(2010,1,15)

The second formula is working , I am not sure why the first one is not.

What I know is FILTER also returns table.

 

1)

 

FILTER(
DimDate,
DATESBETWEEN(
DimDate[FullDateAlternateKey],
DATE(2010,1,15), DATE(2010,1,15)
)
)
 
 
 
2)
CALCULATETABLE(
DimDate,
DATESBETWEEN(
DimDate[FullDateAlternateKey],
DATE(2010,1,15), DATE(2010,1,15)
)
)


1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @MyPowerbi2020 ,

FILTER(<table>,<filter>)  
PARAMETERS
Term Definition
table The table to be filtered. The table can also be an expression that results in a table.
filter A Boolean expression that is to be evaluated for each row of the table. For example, [Amount] > 0 or [Region] = "France"

When you use filter return a table ,need a boolean expression ,but the dax datesbetween is return a table ,not a boolean expression.

vluwangmsft_1-1630393611817.png

 

When I only use the  datesbetween:

 

Table 2 = DATESBETWEEN(
DimDate[FullDateAlternateKey],
DATE(2010,1,15), DATE(2010,1,15)
)

vluwangmsft_0-1630393489758.png

 

Refer:

https://docs.microsoft.com/en-us/dax/filter-function-dax 

https://docs.microsoft.com/en-us/dax/datesbetween-function-dax 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @MyPowerbi2020 ,

FILTER(<table>,<filter>)  
PARAMETERS
Term Definition
table The table to be filtered. The table can also be an expression that results in a table.
filter A Boolean expression that is to be evaluated for each row of the table. For example, [Amount] > 0 or [Region] = "France"

When you use filter return a table ,need a boolean expression ,but the dax datesbetween is return a table ,not a boolean expression.

vluwangmsft_1-1630393611817.png

 

When I only use the  datesbetween:

 

Table 2 = DATESBETWEEN(
DimDate[FullDateAlternateKey],
DATE(2010,1,15), DATE(2010,1,15)
)

vluwangmsft_0-1630393489758.png

 

Refer:

https://docs.microsoft.com/en-us/dax/filter-function-dax 

https://docs.microsoft.com/en-us/dax/datesbetween-function-dax 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

amitchandak
Super User
Super User

@MyPowerbi2020 , filter also returns a table , but try like this and check

FILTER(
DimDate,
DimDate[FullDateAlternateKey] >=
DATE(2010,1,15)  && DimDate[FullDateAlternateKey]  <=  DATE(2010,1,15)
)

 

 

https://docs.microsoft.com/en-us/dax/filter-function-dax

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hey thanks!
I just wanted to know the issue in the first formulae that I have written.
Why this is not getting me the intended result.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors