Forum Discussion
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)
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] > 0or[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.
When I only use the datesbetween:
Table 2 = DATESBETWEEN( DimDate[FullDateAlternateKey], DATE(2010,1,15), DATE(2010,1,15) )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 RegardsLucien
3 Replies
- amitchandakSuper 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)
)- MyPowerbi2020Helper IV
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.
- v-luwang-msftCommunity 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] > 0or[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.
When I only use the datesbetween:
Table 2 = DATESBETWEEN( DimDate[FullDateAlternateKey], DATE(2010,1,15), DATE(2010,1,15) )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 RegardsLucien