Skip to content

MiguelElGallo/JoinOrAssociation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

JoinOrAssociation

The Fan Trap, in BI Tools and SQL

Two tables SONG and GENRESONG:

Tables

Load this tables to any BI Tool, in this case I used Power BI.

This is how the model looks inside Power BI:

Model

And this is the result:

Model

Surprise! It is ten! Notice that if you sum the values (3 + 3 + 4 + 4) = 14,but the report shows 10. The result of 10 shows us that Power BI is using associations.

If we go to SQL world, we create a view:

create or replace view "SONG_GENRE" as
  select 
      T1.SONG,
      T1.DURATION,
      T2.GENRE
  FROM SONGS T1 
  LEFT OUTER JOIN GENRESONG_CSV T2 ON T1.SONG = T2.SONG;

If we connect Power BI to the view we get this result:

Model

Contribute by putting the results of how your BI tool will handle this two tables!

(Tables are availabe in Tables folder)

About

How do BI tools respond to Fan Traps?

Resources

Stars

Watchers

Forks

Contributors