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

Apply Filter from specific date

Hi All,

 

I have last 30 days data with columns Region, etc. Requirement is to apply filter like Region does not contain USA and Mexico from specific date like 20/04/20203. How to achive this. Please suggest

 

Regards,

Suren

1 ACCEPTED SOLUTION


see my video

https://1drv.ms/v/s!AiUZ0Ws7G26Rh3ErTgr710-MAzvV?e=L50uvi
Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26Rh3CTPlsBn409Ozfo?e=pKtsW4

 

 

= Table.SelectRows( from,
      (x)=> not List.ContainsAny( Record.FieldValues(x),{"USA","Mexico"},Comparer.OrdinalIgnoreCase) and 
       x[Date] = #date(2023, 5, 2))

 

 

Screen Capture #1040.png

View solution in original post

7 REPLIES 7
Ahmedx
Super User
Super User

or

= Table.SelectRows( from,
      (x)=> not List.ContainsAny( {x[Region]},{"USA","Mexico"},Comparer.OrdinalIgnoreCase) and 
       x[Date] = #date(2023, 5, 2))

Screen Capture #1041.png

Anonymous
Not applicable

Thank you so much for your time. Please let me know how to achive same in query editor 

Ahmedx
Super User
Super User

or

Screen Capture #1038.png

Ahmedx
Super User
Super User

pls try this

Measure = CALCULATE(
                CALCULATE(SUM('Table'[Value]), 
                    KEEPFILTERS( NOT'Table'[Region] in {"USA","Mexico"}),
                      KEEPFILTERS( 'Table'[Business Days]= DATEVALUE("5/2/2023") ) 
))

Screen Capture #1037.png

Anonymous
Not applicable

Thank you so much for your time.

Due to other limitations, we want to achive same in query editor.  Please let me know how to achive


see my video

https://1drv.ms/v/s!AiUZ0Ws7G26Rh3ErTgr710-MAzvV?e=L50uvi
Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26Rh3CTPlsBn409Ozfo?e=pKtsW4

 

 

= Table.SelectRows( from,
      (x)=> not List.ContainsAny( Record.FieldValues(x),{"USA","Mexico"},Comparer.OrdinalIgnoreCase) and 
       x[Date] = #date(2023, 5, 2))

 

 

Screen Capture #1040.png

Anonymous
Not applicable

Thank you so much. it works

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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 Kudoed Authors