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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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