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
Anonymous
Not applicable

Select a value in a visual, and then filter another visual with conditions around the selected value

Hi all! I would like to seek your help on the below. I would like to select a value on the first visual, and have the second visual filtered with additional conditions.

 

There are 2 visuals. The first one below:

Time

1 June 2021 00:00

1 June 2021 00:15

1 June 2021 00:30

1 June 2021 00:45

 

The second one below:

 

Aircraft        Arrival time                Departure time

Aircraft 1    1 June 2021 00:08      1 June 2021 00:25

Aircraft 2    1 June 2021 00:12      1 June 2021 00:40

Aircraft 3    1 June 2021 00:34      1 June 2021 00:50

Aircraft 4    1 June 2021 00:40      1 June 2021 01:05

 

I would like that the second visual is filtered in a manner that,  it will only show the items if the selected value in the first visual (e.g 1 June 2021 00:15) is between the arrival time and departure time in the second visual. In other words, if 1 June 2021 00:15 is selected, the second visual will only show Aircraft 1 and Aircraft 2. 

 

I am not sure how to create these conditional filters on top of a selected value... Truly appreciate your help on this!

 

Cheers

Tim

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @Anonymous 

You can use the time table as a slicer to filter the data in data table . And then create a measure to display the result .

Measure = CALCULATE(SELECTEDVALUE('Table'[Aircraft]),FILTER('Table','Table'[Arrival time]<MAX('Time'[Time]) && 'Table'[Departure time]>MAX('Time'[Time])))

The effect is as shown :

Ailsa-msft_0-1623394954538.png

 

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

4 REPLIES 4
v-yetao1-msft
Community Support
Community Support

Hi @Anonymous 

You can use the time table as a slicer to filter the data in data table . And then create a measure to display the result .

Measure = CALCULATE(SELECTEDVALUE('Table'[Aircraft]),FILTER('Table','Table'[Arrival time]<MAX('Time'[Time]) && 'Table'[Departure time]>MAX('Time'[Time])))

The effect is as shown :

Ailsa-msft_0-1623394954538.png

 

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

Anonymous
Not applicable

@v-yetao1-msft  Thank you so much for your help! It worked perfectly.

 

Cheers,

Tim

Anonymous
Not applicable

Thanks @Anonymous ! Could you advise what expressions to use if I were to write that measure? 

Anonymous
Not applicable

@Anonymous 

 

The two tables have to be disconnected from each other, first of all. Second, you create a measure that you'll use in the Filter Pane of the visual. If it's value is 1, show the row. If 0, hide it. That's how you do it. Of course, it's up to you to write the measure since you've got all the bits and pieces about your model which we don't.

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.