Why you should always filter columns and never filter tables with CALCULATE in DAX! Article and download: sql.bi/847199?... How to learn DAX: www.sqlbi.com/... The definitive guide to DAX: www.sqlbi.com/...
Пікірлер: 54
@stuartsaint458119 күн бұрын
"Whenever you reference a table in DAX, it is always the expanded table." I see this a lot when somebody starts learning DAX coming from an Excel background, it's a hurdle that people don't necessarily have if you come from a SQL background where this concept is more familar. If you are watching this and feel frustrated to have not known this earlier, remember that you were smart enough to get this far in the first place!
@leppyr645 күн бұрын
This 100%
@akshayebenezar19 күн бұрын
Do you have a video/ playlist with all the golden rules n best practices. Love your work!! ❤
@pluu15318 күн бұрын
Thank you so much for providing such valuable free content. After using Power BI for six months, I've gained a solid understanding of the concepts you've taught. Your lessons have been instrumental in my professional growth as a power bi data analyst
@jonoakdale19 күн бұрын
I've been waiting for an in depth explanation around this golden rule for a while; thank you!!
@Nalaka-Wanniarachchi19 күн бұрын
Another Fantastic one.Alberto & Marco always opens new horizons in DAX to think over.
@nishantkumar957019 күн бұрын
Thanks so much for sharing the understanding about the difference in table and column filters and it's impact. Will definitely keep this in mind while writing measures.
@nevermore1701199018 күн бұрын
if there is a nobel for DAX, this guy deserve it !
@emersonlopez531019 күн бұрын
Great video, thanks a lot. I got the same result by modifying the "Sales Amount" and "Receipts Amount" measures because in sumx I used filtered tables for multiplications greater than or equal to 500, however I am doing a double iteration in each case.
@gurvindersingharora53019 күн бұрын
Please upload more dax videos related summarize and ADDCOLUMNS together usage
@mwaltercpa18 күн бұрын
Thanks for this insight on expanded tables.
@gvitullib19 күн бұрын
Thank you. A great article/video on this important golden rule!
@fsanfo19 күн бұрын
Thanks for sharing! I think it would be nice to have a video about when the use of filters in tables is unavoidable.
@SQLBI18 күн бұрын
Never?
@workstuff525319 күн бұрын
Counting with Alberto! Love it!!
@nikakalichava801219 күн бұрын
Thank you for sharing this. really insightful.
@rowanschoultz102211 күн бұрын
Alberto, you mentioned that this is one of the "golden rules of DAX". Do you have a compilation of these golden rules available anywhere? See you Sep 18th in Calgary.
@ajaaskelainen9 күн бұрын
Thank you!
@RobertoStaltari19 күн бұрын
SQLBI: Masters at work.
@anilyadav-rt4sr19 күн бұрын
Thanks Sir ji after a long time create a nice video
@xyclos15 күн бұрын
Great explantion, Thanks!
@marcofestu18 күн бұрын
The DAX magister
@brnnie18 күн бұрын
Thank you for sharing this ❤
@lovlyhearts28815 күн бұрын
Nice explanation
@AlirezaEmamiFard19 күн бұрын
Thanks, it's really useful
@anoopdube958119 күн бұрын
Very insightful
@dutch-man19 күн бұрын
Nice video as usual 😎👏
@stylianoschiotis519119 күн бұрын
Excellent 👌
@paulinafaryna637219 күн бұрын
This is brilliant
@mogarrett304519 күн бұрын
thank you
@common_sense475319 күн бұрын
@sqlbi thanks. I just got confused, though. I always thought that what you described as the column filter was ultimately converted by the engine to filter(all(sales), amount>=500) Now I’m confused :)
@SQLBI18 күн бұрын
It is converted to a column filter, not to a table filter: www.sqlbi.com/articles/filter-arguments-in-calculate/
@@Nalaka-Wanniarachchimy question exactly! Need to try it on a model to make sure it works like this or not
@louiseshorten938919 күн бұрын
I didn’t know about the golden rules. Thanks for this video! Just wondering, I assume you could add a Boolean flag as a Column which checks whether the relevant values >500 and then this could be the filter. How would this compare? Thank you
@SQLBI18 күн бұрын
Yes, see this article for the fundamentals: www.sqlbi.com/articles/filter-arguments-in-calculate/
@attaurrahman188019 күн бұрын
Thank you for Sir
@marcomapelli595319 күн бұрын
Molto interessante! C'è un elenco di queste "regole fondamentali" da qualche parte?
@gurvindersingharora530113 күн бұрын
Hello Alberto Sir, A lot of people are creating Pareto Chart in Power Bi Using various techniques of DAX. What will be yours ?? Please Create a Video of it !! ❤
@SQLBI13 күн бұрын
You have a full pattern here: www.daxpatterns.com/abc-classification/
@douglascory19 күн бұрын
I always found it weird when people used FILTER inside a calculate, like I always thought: There must be a reason they are using it, since calculate already filters Nope, turns out it was just wrong lol
@pillslifestylereviews671419 күн бұрын
The screenshot perfectly describes me when DAXing...
@workstuff525319 күн бұрын
Slightly off the topic (but still related). I suspect some of the reasons are based on requirements to enable a better demonstration, but is there an advantage to having DAX calculate the sales value (net price * quantity) over having the value calculated in an ETL process and having the value stored in the model as a further column.
@SQLBI19 күн бұрын
Usually you save memory thanks to a better compression, unless you have billions (not millions) of rows, in which case the difference is negligible and the perf improvement of a single column is relevant (it is not with millions of rows).
@Superninja121119 күн бұрын
Billion !!!... not Million !!!.... But other than that thanks. Very helpful!
@amitsatnalika576019 күн бұрын
this problem of intersecting expanded table arises bcz we have two fact tables here and we are using these two together inside a single calculate, we can use these in two separate calculate and add those measure............................................................................................ what if if we have only one fact table , there expanded tables helps , let say in case where we have a measure associated with a dimension table and we need to respect filter coming from other dimension table , in that case only table filter or expanded table is the rescue.
@SQLBI19 күн бұрын
Normal filter propagation in that case doesn't require the expanded table. The example in the video is a simplification of a more complex real-world case scenario where table filters are applied on high-level measures, and down the hierarchy of nested measures in the calculation you could have a similar situation like the one described in the video, but in a more complex scenario where the presence of the issue is less obvious and much harder to investigate.
@Milhouse77BS19 күн бұрын
Always interested when I hear “never”.
@mathew966518 күн бұрын
Interesting - how about a filter around a number of summarised columns like: VAR _FilteredWithoutFees = FILTER ( SUMMARIZECOLUMNS ( 'Sales'[AdminFee], 'Sales'[IsVoided], TransTypes[TransType] ), 'Sales'[AdminFee]
@SQLBI18 күн бұрын
The filter over columns in AND condition should be always split by column. Try to apply this filter to a CALCULATE with a non-additive measure (e.g. DISTINCTCOUNT, apply YTD, or use a bidirectional relationship) and you'll see the impact.
@mathew966517 күн бұрын
@@SQLBI Thank you kindly - I don't understand how to use filter columns then build it into an in memory table. - what would be the best method to use in this type of requirement
@SQLBI16 күн бұрын
We suggest that you review the foundational concepts - use this free course to start: www.sqlbi.com/p/introducing-dax-video-course/
@mathew96659 күн бұрын
@@SQLBI Thank you after posting - I did a lot of testing of the basic calculate filter - it works and a lot quicker
@frasermartens397618 күн бұрын
Honestly, I sometimes think Microsoft should just completely remove the ability to filter a table. What's even the point of having this unnecessary and clumsy function in the language at all? Is there some arcane use case that it needs to be kept to address?