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
ReadTheIron
Helper III
Helper III

Multiple Filters with OR

My data looks something like this:

ReadTheIron_0-1635516762191.png

I want to create a visual showing all upcoming inspections that would look something like this:

ReadTheIron_1-1635516846699.png

I want to display only the upcoming dates. If an asset has an upcoming date in one group and a past date in another, I want to display the asset, but I don't want to display the past date.

 

After some googling, I tried creating tables for the unique values in each column and then writing a measure that assigned a 1 or a 0 based on whether the selected value appeared in any of the columns of the original table, but this didn't work. (And I didn't even get into how to write a relative date in DAX, though I could probably find info on that easily enough if I could get my other conditions working)

 

Still quite new to this; any help appreciated!

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@ReadTheIron I think the easiest way to do it would be to have a measure that checks each group inspection column and returns the date it is > TODAY().

 

A Inspection = 
VAR _Inspection = SELECTEDVALUE ('Table'[A Group Inspection] )
RETURN 
IF ( _Inspection > TODAY(), _Inspection )
B Inspection = 
VAR _Inspection = SELECTEDVALUE ('Table'[B Group Inspection] )
RETURN 
IF ( _Inspection > TODAY(), _Inspection )
C Inspection = 
VAR _Inspection = SELECTEDVALUE ('Table'[C Group Inspection] )
RETURN 
IF ( _Inspection > TODAY(), _Inspection  )

 

2021-10-29_8-27-04.jpg

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@ReadTheIron I think the easiest way to do it would be to have a measure that checks each group inspection column and returns the date it is > TODAY().

 

A Inspection = 
VAR _Inspection = SELECTEDVALUE ('Table'[A Group Inspection] )
RETURN 
IF ( _Inspection > TODAY(), _Inspection )
B Inspection = 
VAR _Inspection = SELECTEDVALUE ('Table'[B Group Inspection] )
RETURN 
IF ( _Inspection > TODAY(), _Inspection )
C Inspection = 
VAR _Inspection = SELECTEDVALUE ('Table'[C Group Inspection] )
RETURN 
IF ( _Inspection > TODAY(), _Inspection  )

 

2021-10-29_8-27-04.jpg

That worked beautifully! Thank you so much - this will be very helpful.

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.