The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Suppose that I have the following four tables of data in Power BI:
Table 1.
Name | Country | Age | Points |
Karl | Germany | 14 | 5 |
Elena | Germany | 15 | 5 |
Anne | Germany | 13 | 10 |
Kalle | Sweden | 13 | 15 |
Pelle | Sweden | 12 | 20 |
Gloria | Spain | 11 | 10 |
Table 2.
Code | Hobby | Hobby type |
1 | Football | Sport |
2 | Basketball | Sport |
3 | Piano | Music |
4 | Violin | Music |
Table 3.
Name | Hobby of interest (code) |
Karl | 1 |
Elena | 1 |
Anne | 1 |
Kalle | 2 |
Pelle | 4 |
Gloria | 3 |
Table 4.
Name | Hobby (code) |
Karl | 1 |
Anne | 1 |
Gloria | 3 |
I want to build a table visualisation based on this data.
For example, if I chose hobby type = sport, then the averages would be calculated for German people, who have a hobby of type Sport, that is, football or basketball. Thus, the averages are calculated for Karl and Anne. The resulting table visualisation would be:
Average age | Average points |
13.5 | 7.5 |
But how could I do this table visualisation? There is a connection between people names in different tables, and connection between hobbies and their codes. I need to be sure that the resulting table is calculated only for people with a given hobby (and/or hobby type), not for every person interested in a given hobby.
Since Table 3 doesn't seem to play a role in your question you can ignore that. Your other filters can be done with standard Power BI Desktop functionality. What have you tried and where are you stuck?
When I create a slicer with hobbies (football, basketball, piano, violin), I cannot be sure whether it filters based on hobby or hobby of interest.
Read about ISFILTERED and FILTERS functions.