In February 2017 Power BI introduced a new function called TREATAS. It simply creates virtual relationships between tables. But why we should create virtual relationships instead of physical ones? Actually, we shouldn't. It is recommended to use physical relationships whenever it's possible, but Power BI is not always sunshine and rainbows. Especially when we need to create relationships between tables that have different granularities. For this example, I have an advertising budget table for the year 2019 and a calendar table for many years: In this situation, I need to create a relationship between my budget table and calendar table, so that I can create time intelligence measures. But I can't do it, because these two tables have different levels of granularities. While the calendar has a row for every day, the budget table has a row for every month, which means my calendar has higher granularity than my budget table. If we create relationships between tables that have di...
A blog about solving the problems that we face, while we're creating Power BI reports.