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
bakkek93
New Member

Filtering a visualization off of multiple columns in a table with different datasources

I am currently using 3 tables.

 

Table 1 (FilterTable) covers a unique list of codes and has their start and end dates for when they are/were relevant.

Table 2 (Volume) covers the volume associated to those codes between a 7 day rolling date period (today and back one week, constantly updating).

Table 3 (Lookup) is used to join the two tables because in one spot they are “1” or “2” and in the other spot they are “Code 1” or “Code 2”.

 

My relationship currently works where I can click on Filter Table “Code 5” and the visualization built off of Volume will only show data related to “Code 5”. However, I would like to have the visualization also filter based on the FilterTable start and end date and I have no idea how to get that portion to work.

 

In the example included in my sample data below, I can click “7” in my filter table and it will highlight code 7 in the right visualization, but since the date range is 10/5-10/9, I’d like the visualization to also include the specified dates in the table as a filter criteria. Any help would be greatly appreciated! 😊

 

Volume Table

10/4/2018Code 640
10/4/2018Code 742
10/5/2018Code 47
10/5/2018Code 771
10/5/2018Code 897
10/5/2018Code 920
10/5/2018Code 1035
10/6/2018Code 137
10/6/2018Code 230
10/6/2018Code 389
10/6/2018Code 71
10/7/2018Code 942
10/7/2018Code 751
10/8/2018Code 130
10/8/2018Code 2100
10/8/2018Code 736
10/9/2018Code 628
10/9/2018Code 731
10/9/2018Code 89
10/9/2018Code 914
10/9/2018Code 1057
10/10/2018Code 13
10/10/2018Code 263
10/10/2018Code 328
10/10/2018Code 449
10/10/2018Code 759
10/10/2018Code 1096

FilterTable

1Here is a text field8/1/20188/10/2018
2Here is a text field10/4/201810/6/2018
3Here is a text field10/1/201810/12/2018
4Here is a text field6/1/20186/10/2018
5Here is a text field10/10/201810/12/2018
6Here is a text field11/1/201811/30/2018
7Here is a text field10/5/201810/9/2018

Lookup Table

1Code 1
2Code 2
3Code 3
4Code 4
5Code 5
6Code 6
7Code 7
8Code 8
9Code 9
10Code 10

 

 

Relationships used:

1. FilterTable CodeName to Lookup Code. Many to One. Both.

2. Volume Table Code to Lookup Full Code Name. Many to One. Both.

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish_Mathur! Thanks for the reply! I am still unable to get it to work as expected.

 

The Filter table should have a start and end date and be used for filtering the visualization. I was hoping to learn how to join the filter table to the volume table on both of those dates so that when you click on Code 7 in the table, it only shows the dates where relevant. In the example below, since the start date and end date are 10/5 and 10/9 then we'd filter out 10/4 and 10/10 data. Is there a way to set date variables based on what selection you click in the table and then pass them to the visualization as only show data between startdatevariable and enddatevariable?

 

Thanks!!

 

 

 

Capture2.JPG

Hi,

 

Does my solution not achieve that?  What happens when you build a visual in the file that i shared with you?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish_Mathur,

 

No I am not able to get the attached pbi to do what I need. The filter table needs to have a date range instead of just one date and it needs to filter the graph to the right when selected. I pulled out the filter table and the volume graphic below, but you can see when I click on a specific date, it doesn't filter the graphic to the right based on the selection. Does that make sense? Thank you so much for working through this with me - I really appreciate your help!!

 Capture.JPG

Hi,

 

On the file that i shared with you, build your desired visual visual/slicers and share the download link with me.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.