Forum Discussion
Clearing a slicer value
- 6 years ago
Hi Anonymous ,
maybe this helps to create a default filter element, what is always valid.
Anonymous - why would you not have a date table? You just link the date to every date field in your model (or at least 1 per table) and it doesn't matter if it is a day, week ending date, or month ending date. It units the model and allows you to control any aspect of the model via date from one place.
Various articles point to the performance impact of creating/having date tables as they contain every date from the minimum to the maximum by day. That is, if I have issues created in 2016 in the model ending in 2020, we have 1600 records, and growing every day.
Additionally, if a table has multiple dates (let's say a trouble ticket system) including issue creation, last modified, first worked, resolved, wouldn't you need to create a relationship between the date table and each of those fields to use to slice the data? Since last modified is a date and time field, wouldn't your date table then also include the time in case you wanted to see what was modified during a work day from 6/2/2020 8:00 to 6/2/2020 17:00?
Finally, linking the date table and, if I am getting you correctly, having a single filter to control the date range, the system wouldn't know - from a single table - what field from the issue table to reference. If I used a slicer against the date table, how would it know if I wanted to use the range 5/24/2020 -> 5/30/2020 on the created, resolved, or modified field.
Maybe I'm not understanding the benefits of a date table, but it's one of the listed ways to improve performance from a number of sites. I don't know enough, with regards to the benefits, for me to implement it in a way that is beneficial; especially if I have multiple date fields in a record.
- mwegener6 years agoMost Valuable Professional
- edhans6 years agoCommunity Champion
Anonymous - that is if you use CALENDARAUTO() which you should never do. Date Tables should be created in Power Query. Below is a link to an blog post I wrote that will let you create a dynamic date table that will move and expand with the relevant dates in your model, not all of the dates.
Any article that argues against a date table because it has 4 years of dates really doesn't understand what it is talking about. 1,600 rows in Power BI is nothing. The issue is when you use CalendarAuto and some table has a fake expiration date of Dec 31, 9999. Then you get 2.9 million records. That is a problem.
Here is an article that covers some basics of why a date table should be used. You generally never want to put dates from your FACT tables or other DIM tables in visuals. Always use the linked date from the date table. in fact, I most often hide those other date fields so I don't accidentally use them.
- Anonymous6 years agoNot applicable
https://adatis.co.uk/top-10-power-bi-performance-tips-part-2/
I liked the point on the inactive relationships by the other poster, I didn't even know that was an option, I'd be curious as to the performance impact.
I can't appropriately explain the model we use as I don't have the correct words, but I don't think we use a 'true' fact/dim model as we have normal people developing reports off of the source and it's not intuitive to a non-developer how to create visuals. So a lot of our tables are 'result' table and they can use the dim table for filtering, but the 'report' tables include some of the data from the dim tables.
And I have no idea what you mean by "never want to put dates from your FACT tables or other DIM tables in visuals" as fact tables include things like create_dt, last_modified_dt, sales_dt, etc. If all of those values were in a Dim table, then I would have 5.23 million rows in that table - I just ran a count distinct on the last modified date in our table.
- edhans6 years agoCommunity Champion
Anonymous Power BI is built on top of SQL Server Analysis Services - you actually launch an SSAS instance when Power BI launches on your PC.
It is optimized for a query model where the DIM tables are NOT normalized, using a Star Schema. Massive repitition in the DIM tables is fine. Segregating things out into a snowflake schema, like a normal SQL type person thinks, is not good for Power BI. It doesn't perform well. If you know SQL and are used to that, you have to unlearn that for Power BI, or you will bog down its performance. See this article for more, or look at this course and book by SQLBI.
If you cannot adequately explain your model and how it relates to a Star Schema model, you will experience problems with performance and writing measures to return what you want. It is all designed with a Star Schema: DAX, the Vertipaq engine, the tabluar model of SSAS, all of it. While you see tables, and Power BI presents tables to you, in reality, it is only dealing with columns. You can read some of the technical bits here. It is interesting to note that one of the recommendations is, always add a DATE dimension table. You don't need to understand all of it. Just know that is how it is designed, and doing it differently means it will not perform as well as it could, and it will cause you to work harder as a developer to write measures to get the visuals you want.