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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to use DAX Filter function with date filter

i am trying to use DAX filter function to  to create a new column based on  this query, i keep getting a scalar error when i try to create the column. could someone  please give me some guidance on how to create this column?

((xyz = 'CLOSED' or zxy= 'COMP' or xyz = 'CROWNER' or xyz = 'OPSDEFREV' or xyz = 'PEERREVIEW' or xyz= 'WAITINGRER') and orderedate >= TO_TIMESTAMP ('2022-01-01 00:00:00.000' , 'YYYY-MM-DD HH24:MI:SS.FF'))

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

Hi, @Anonymous 

Please add a measure filter like:

Measure1 =
IF (
    MAX ( 'Table'[xyz] )
        IN { "ClOSED", "COMP", "CROWNER", "OPSDEFREV", "PEERREVIEW", "WAITINGRER" }
            && MAX ( 'Table'[orderedate] ) >= DATE ( 2022, 01, 01 ),
    1,
    0
)

Then apply it to table visual filter pane to filter data rows.

veasonfmsft_0-1655113617374.png

Best Regards,
Community Support Team _ Eason

 

 

 

View solution in original post

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Please add a measure filter like:

Measure1 =
IF (
    MAX ( 'Table'[xyz] )
        IN { "ClOSED", "COMP", "CROWNER", "OPSDEFREV", "PEERREVIEW", "WAITINGRER" }
            && MAX ( 'Table'[orderedate] ) >= DATE ( 2022, 01, 01 ),
    1,
    0
)

Then apply it to table visual filter pane to filter data rows.

veasonfmsft_0-1655113617374.png

Best Regards,
Community Support Team _ Eason

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.