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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HenryJS
Post Prodigy
Post Prodigy

Two Filters

Hi all,

 

How do I filter the data below data to include:

  • EITHER PlacementDate is in the last 1 week
  • OR PlacementExtensionStartDate is in the last 1 week

 

When I put both filters on in the filter pan it only shows data which are both Placement Date and Placement ExtensionStartDate is in the last 1 week.

 

I would like to return data where either Placement Date or Placement ExtensionStartDate is in the last 1 week.

 

 

Filters.PNG

 

5 REPLIES 5
Anonymous
Not applicable

Hi

 

all filters are applied in AND, you can't by design have OR filters (not in a visual like that anyway). That is the way Datawarehouse works (as you're slicing a piece of the cube), not a limitation of PowerBI. 

 

One workaround is to create a secondary column in your original datasource where you store the "max" of (PlacementDate, PlacementExtensionDate), then your filter works on this column rather than the original two. It has some drawbacks but is the easiest and quickest.

Hi all,

 

Please could someone help me with the below DAX?

 

Starters = IF(('Placements - (candidates)'[PlacementDate] = LAST 7 DAYS ) && ('Placements - (candidates)'[ExtensionEndDate] = LAST 7 DAYS ),1,0)

 

I don't know how to write the last 7 days part of expression.

 

Thanks,

 

Henry

Hi,

 

Please try to use relative date filtering:

131.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

Starters = IF(('Placements - (candidates)'[PlacementDate] >= TODAY()-7 ) && ('Placements - (candidates)'[ExtensionEndDate] = TODAY()-7),1,0)

Greg_Deckler
Super User
Super User

You will most likely need to create a measure that returns something like 1 given your criteria and BLANK otherwise and add that to your table. Then you could filter on that.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.