Forum Discussion
Dynamically Filter Visualization Based On Look-Up Table
Hi Everyone,
This is my first post and I'm new to PowerBi so please excuse any lack of understanding on my part!
I have 2 data tables that I'm building my report off of, we'll call them:
1. Data_Dump_Table
2. Look_Up_Table
Table 1 contains metrics on many different products, and Table 2 contains the filters I would want to use for my visualizations depending on which product is selected. See example tables below.
The report itself would contain 2 visualization (line charts), 1 for each metric, and a dropdown box.
Table 1 Data_Dump_Table
| Product Name | Item Number | Level | Metric 1 | Metric 2 |
| A | 1 | 100 | 10 | 50 |
| A | 1 | 200 | 15 | 60 |
| A | 2 | 100 | 11 | 51 |
| A | 2 | 200 | 17 | 58 |
| B | 1 | 150 | 12 | 53 |
| B | 1 | 225 | 19 | 58 |
| B | 2 | 150 | 9 | 55 |
| B | 2 | 225 | 16 | 61 |
Table 2 Look_Up_Table
| Product Name | Metric 1 Level | Metric 2 Level |
| A | 100 | 200 |
| B | 150 | 225 |
The plan is:
- I select a product in the dropdown box (Example, product "A" is selected)
- Visualization 1: Now contains all product A Metric 1 data
- Visualization 2: Now contains all product A Metric 2 data
- Based on Table 2, I want to further filter down my two visualizations
- Visualization 1: Should only contain Metric 1 data at "Level" 100
- Visualization 2: Should only contain Metric 1 data at "Level" 200
And you can see that the "Level" which needs to be filtered at changes based on which Product is chosen.
So, I want to dynamically filter my visualizations based on a look up table.
Any help would be greatly appreciated, thank you!
5 Replies
- lbendlinSuper User
"
I select a product in the dropdown box (Example, product "A" is selected)
- Visualization 1: Now contains all product A Metric 1 data
- Visualization 2: Now contains all product B Metric 2 data "
Please explain the reasoning behind the last statement.
- MikeModaffNew Member
Hi, Sorry it was a typo which I've now edited!
Both visuals will show "Product A" data.
- lbendlinSuper User
Have you worked with SELECTEDMEASURE yet?