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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
trevordunham
Resolver I
Resolver I

Filtering out members of a field only after a specific date

Hello,

 

I have some data where I need to filter out members of a field after Q2 of this year. The date field is just quarter so not an actual date field if that changes anything.

 

IE:

 

Field (Team) = A,B,C,X,Y,Z

 

I need my data to contain all teams prior to Q3 but in Q3 and onward teams Y and Z are filtered out. 

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @trevordunham ,

I created some data:

vyangliumsft_0-1692080156442.png

 

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _today=TODAY()
var _Qu=QUARTER(_today)
return
SWITCH(
    TRUE(),
    _Qu>2 && NOT(MAX('Table'[Field])) in {"Y","Z"} ,1,
    _Qu<=2 && MAX('Table'[Field]) in SELECTCOLUMNS('Table',"Field",'Table'[Field]),1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1692080156444.png

3. Result:

Today is the third quarter, and Y and Z will not be shown on Legend

vyangliumsft_2-1692080201139.png

 

Best Regards,

Liu Yang

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @trevordunham ,

I created some data:

vyangliumsft_0-1692080156442.png

 

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _today=TODAY()
var _Qu=QUARTER(_today)
return
SWITCH(
    TRUE(),
    _Qu>2 && NOT(MAX('Table'[Field])) in {"Y","Z"} ,1,
    _Qu<=2 && MAX('Table'[Field]) in SELECTCOLUMNS('Table',"Field",'Table'[Field]),1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1692080156444.png

3. Result:

Today is the third quarter, and Y and Z will not be shown on Legend

vyangliumsft_2-1692080201139.png

 

Best Regards,

Liu Yang

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

AliceW
Power Participant
Power Participant

Hi Trevor,

Not clear about the place you want to filter them. Is it in a table visual in a report?

How's the data structure? Like, one table with columns 'Member' and 'Quarter' and presumably 'Activity' or 'Invoices'?

Yes, these are just a few different line and bar graphs I would like to filter. The date is one table with multiple columns like you suggested.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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