Forum Discussion
Clearing a slicer value
- 6 years ago
Hi Anonymous ,
maybe this helps to create a default filter element, what is always valid.
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.
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.
- Anonymous6 years agoNot applicable
While I can understand your point, I believe you are missing mine, and we are way off the original question of how we clear a slicer value - that has not been resolved and doesn't appear that is can be. We can limit it as much as we want to, but nothing in the Power BI deselects slicer values that are no longer valid.
We do not have developers using Power BI in all cases; we have project managers and others who are not versed in, nor have any inclination to be, database or developers. As such, we can set up any sort of star schema we want, but it doesn't matter. We have to provide them a clear, single table to use when they are creating the reports and facilitate 'ease of use.' Trying to explain how to write measures using inactive relationships, is well beyond their skillset.
The analogy is this - in SQL Server, you have a set of dim and fact tables storing the data. The customer needs to write 10 SQL statements that always join 5 of these tables together, albeit with different where clauses. The easiest way for them to accomplish this with minimal effort on their part would be to request a view. Does this make it less efficient? Maybe, but that is what we have done for our users in this model. Can we associate that view to dim tables in the model and use that dim table for filters? Yes. Can we force them to create visualizations based on fact to dim relationships? No.
If we had a team of developers or others that could understand and use the model in that way would make life easier. However, that is not the case. I'll have to look up how we could create the measures to use the inactive relationships. Since it's a live connection model, I may be able to create the measures on that side for the inactive relationships.
As a side note, I haven't had the time to review anything you've provided before, so I apologize if anything I've said above is covered in those posts.
As people who generate the models, there is no one true way to do things. We can have our best practices and ideas, but at the end of the day, we need to provide our customers with a model they can use and understand. Education is key, but given the wide availability of the tool, sometimes we have to cut corners. With a limited amount of technically savvy team, it is not always an efficient use of our time to make the perfect model; you make a good enough model. Those reports which update twice a day, load less than 10 MB of data, and are not modified after creation, working to make the most performance efficient model is just not worth the time. For reports which update every 30 minutes, then yeah, be uber-efficient, spend the time documenting to an end-user level, or flag those as "For Developer Modification Only."
Again, I do get what you are saying, and I appreciate the education provided.