Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am new to Power BI so I have watched some videos on creating realtionships but I haven't been able to get it to work so thought I would try to ask in here.
I have one long dataset with the columns:
"ID", "Question", "Answer", "Count"
The "Question" column contains 50 questions that have been asked to each "IDs" and their answer is recorded in the "Answer" column and the "Count" column counts the number of times the answer recorded in "Answer" is present for that specific question across IDs. Since there are 50 qustions and 20 respondents, the lenght of the table is 1000 rows. I want to create a relationship so the answer to one of the questions filters the graphs for other questions. E.g., one of the questions asks what income bracket the respondent belongs to while another asks them which state they are located in. I can create two different graphs that show the number of people located in each of the states and the number of people in each of the distinct income brackets, but I want to create a realtionship so when I in the income bracket chart press on the column with the income bracket 100k-200k, it highlights in the locations chart where the people are located that are in the income bracket 100k-200k.
Thank you so much for your response. I wasnt able to get this to work sadly but I also want to avoid using slicers as it can pontetially add a lot of slicers to a page depending on the number of graphs.
To create the desired interaction between the visuals, you can utilize the "slicer" functionality in Power BI. You don't necessarily need to create relationships between tables in this case since all the data is in a single table.
Here's how you can achieve the desired result:
Add two bar chart visuals to your report.
In the first bar chart, use "State" (which you can get by filtering the "Question" column) as the axis and "Count" as the value.
In the second bar chart, use "Income Bracket" (which you can get by filtering the "Question" column) as the axis and "Count" as the value.
Add a slicer visual to your report to filter by Income Bracket:
In the slicer, use a measure that filters the "Answer" column based on the selected "Question" for the Income Bracket.
Create a measure like this:
Income Bracket Answer =
CALCULATE (
SELECTEDVALUE ( YourTableName[Answer] ),
YourTableName[Question] = "Income Bracket Question"
)
Replace "Income Bracket Question" with the actual question text related to income brackets.
Add another slicer visual to your report to filter by State:
In the slicer, use a measure that filters the "Answer" column based on the selected "Question" for the State.
Create a measure like this:
State Answer =
CALCULATE (
SELECTEDVALUE ( YourTableName[Answer] ),
YourTableName[Question] = "State Question"
)
Replace "State Question" with the actual question text related to states.
Now, when you select an income bracket in the first slicer, it will filter the data in both bar charts based on the selected income bracket. Similarly, when you select a state in the second slicer, it will filter the data in both bar charts based on the selected state. This way, you can see the intersection of income brackets and states in your visuals.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |