Differences between ALLSELECTED and KEEPFILTERS - Unplugged #33

  Рет қаралды 20,998

SQLBI

SQLBI

2 жыл бұрын

While ALLSELECTED and KEEPFILTERS are two very different DAX filter modifiers, in certain scenarios they seem to be alternatives to obtain the same result.
Starting from a case like that, we clarify the differences between the two using several practical examples.
Download sample file: www.sqlbi.com/tv/differences-...
Read more about the "unplugged" format: www.sqlbi.com/blog/marco/2021...
#unplugged

Пікірлер: 45
@PHILIPROYBENEDICTLOUIS
@PHILIPROYBENEDICTLOUIS 2 жыл бұрын
Whiteboard explanation helped me to understand more clearly, a humble suggestion is please do use that whiteboard with at least 2 examples with different data set. Thanks for helping us with great content
@psz34
@psz34 7 ай бұрын
After watching half of this video I was already enlightened, thank you so much, I did struggle to understand the difference :D
@allmazd
@allmazd 2 жыл бұрын
This explanation is probably the best that I heard about this function. Thank you very much!
@williamrodriguez2694
@williamrodriguez2694 2 жыл бұрын
Excellent video! The subtle implications (e.g., when showing brand AND color in the visual) really help report authors understanding of potential results for future analysis (e.g., Allselected works at brand level, but not color). Again, brilliant as always - thanks!
@augustotanaka
@augustotanaka 2 жыл бұрын
Nice video as always, clear and concise! Thanks Marco!
@Milhouse77BS
@Milhouse77BS 2 жыл бұрын
Following up the matrix explanation with the Whiteboard one helped, thanks. I think I'm (finally) starting to reallly understand KEEPFILTERS.
@jasondavidsondata
@jasondavidsondata 2 жыл бұрын
Great explanation! This has helped me understand the two options. Thanks for that.
@prasad9976
@prasad9976 10 ай бұрын
It was your first video i watched and liked it. Your explanation was so smooth and understandable
@sauravsinha6939
@sauravsinha6939 Жыл бұрын
I would like to say Thank you as you have used white board and explained in the best way a Teacher could please explain each concepts in the same way . I am ur fan now
@micobree
@micobree 2 жыл бұрын
If we add VALUES('Product'[Color]) as additional filter argument of Calculate in Trendy Colors 1 we get the same result as for Keepfilters, but ofcourse, using Keepfilters is better, more clear and simple. Thank you for great example and explanation
@thevenom6902
@thevenom6902 2 жыл бұрын
Both of you are the best.No other words :)
@saharlatifi3510
@saharlatifi3510 2 жыл бұрын
Great explanation. Thank you so much.
@user-br5yi5kf9s
@user-br5yi5kf9s 2 жыл бұрын
Thank you very much for your great explanations, I'm a fan now)
@mnowako
@mnowako 2 жыл бұрын
Nicely done. Thank you!
@JonathanCHANAL
@JonathanCHANAL 2 жыл бұрын
Thank you very much, this is really clear, very well explain, thx!
@joaquimcosta952
@joaquimcosta952 2 жыл бұрын
Very nice explanation. Thanks.
@inkuban
@inkuban 2 жыл бұрын
Well explained! Thanks a lot!
@user-wx3dn3il2f
@user-wx3dn3il2f 2 жыл бұрын
thank you for your great video. i am always confused. but this video help remind a of recap between allselected and keep filters!!! thank you very much
@sane7263
@sane7263 2 жыл бұрын
I've read the article on SQLBI and I came to know that if you use ALLSELECTED as a Table function with a Column it will dismiss all Filters and return the entire column if there is no Shadow Filter available. But here you are putting ALLSELECTED inside the FIlter as a Table Function and it is still behaving like a Calculate Modifier. Why? Is there anything I need to know?
@juanodonnell
@juanodonnell Ай бұрын
You said that allselected sums all the color in the calculate funtion {green, red, blue} every time but when you open the contoso product we can see that only red and blue are summed, not green.
@kalinduSekara
@kalinduSekara 2 жыл бұрын
Great video 👍
@meshalnafea5200
@meshalnafea5200 Жыл бұрын
Thanks, Marco Russo
@Bharath_PBI
@Bharath_PBI 2 жыл бұрын
Thank you. If we use keepfilters () in trendy colours 1 measure, then results will be identical to the 2nd measure?
@wodraeve
@wodraeve 2 жыл бұрын
Thank you for this video! An a DAX-unrelated note.. What tool are you using to zoom/draw the boxes live? Thank you.
@SQLBI
@SQLBI 2 жыл бұрын
Zoom It: docs.microsoft.com/en-us/sysinternals/downloads/zoomit
@2404Pepe
@2404Pepe 2 жыл бұрын
Excelent!!!
@u828576
@u828576 Жыл бұрын
I think it may have helped if the Contoso colours shown @9:08 included the colour green. Since Green is not selected in the visual filter but is in the measure, see what value would be placed in the cell would make it easier to understand. So, if green is not in the visual filter, will the measure include it with keepfilters?
@SQLBI
@SQLBI Жыл бұрын
Good point, but it was intentional: indeed, the total is not including Green because it is not in the slicer. KEEPFILTERS would not add a color that is not included in the filter context, so there would be no difference in that case, too.
@akshayachandrasekar8285
@akshayachandrasekar8285 2 жыл бұрын
So is it like keep filters considers the context filters and the external filters. But all selected only considers the external filters and ignores the context filters?
@pbihari0214
@pbihari0214 2 жыл бұрын
thank you
@wajdimatoussi
@wajdimatoussi 2 жыл бұрын
Thanks
@Davide73
@Davide73 2 жыл бұрын
Is it possible to download the PowerBI file used? Thank you very much!
@SQLBI
@SQLBI 2 жыл бұрын
Yes, from this page: www.sqlbi.com/tv/differences-between-allselected-and-keepfilters-unplugged-33/
@nidhisingh4973
@nidhisingh4973 8 ай бұрын
I learned many concept by SQLBI but got confused by this video. Its mentioned, ALLSELECTED override the other filter but I don't think this is correct. Filter (All(Product[Color], Product [color] in {"Red", "Green", "Blue"}) gives the same result as Filter (Allselected (Product[Color], Product [color] in {"Red", "Green", "Blue"}) Here its overriding the any other filter bcz of Product [color] in {"Red", "Green", "Blue"} which is mentioned after Allselected.
@akpokemon
@akpokemon Жыл бұрын
WHAT ABOUT THE FILTERS ON THE RIGHT-HAND-SIDE DRAWER???? HOW DO YOU RESPECT THOSE??
@paragkhandalkar
@paragkhandalkar 2 жыл бұрын
Hello, If we have calculated measures which are being used in other calculated measures..and if have many such calculated measures being used or being called in another calculated measures. What is the best practice to handle this. Because i have the such case and its consuming so much time in evaluating.
@SQLBI
@SQLBI 2 жыл бұрын
ALLSELECTED applies to filter context outside of the "visual", or outside of the last iterator - nested measures don't count. See this article for more details: www.sqlbi.com/articles/the-definitive-guide-to-allselected/
@feo786
@feo786 2 жыл бұрын
Is KEEPFILTERS exactly the same as ALL when it's used as a CALCULATE modifier? I'm guessing that ALL can be used as both a CALCULATE modifier and as a standalone table function whereas KEEPFILTERS is just a CALCULATE modifier, is that correct? Also, KEEPFILTERS seems to make the code more intuitive and readable in terms of what it's doing. EDIT. I'm completely wrong, I think I'm referring to REMOVEFILTERS.
@SQLBI
@SQLBI 2 жыл бұрын
Read this article/video and related articles: www.sqlbi.com/articles/when-to-use-keepfilters-over-iterators/
@lukasj7689
@lukasj7689 2 жыл бұрын
at 9:08 you are saying that allselected creates a filter on its own and disregards any external / internal filters. However if that would be the case, the total of 346k shouldnt be 436k as it was at 1:56 using simple Filter approach ? it seems to me that allselected takes the external filters (because it sees that color Green is not selected, therefore it doesnt add up to the initial 436k for Contoso line), however ignores the internal filters (or I would say a filter that comes from a row context), leading to the identical result for all colors within Contoso brand. Isnt that the case? If so then your statement at 9:00 that allselected sums all 3 colors "no matter what" would be incorrect as it clearly does not sum up color green. or maybe i got it totally wrong :D
@marcorusso7472
@marcorusso7472 2 жыл бұрын
I'm not sure I understand your question. However, you can find a complete explanation of ALLSELECTED here: www.sqlbi.com/articles/the-definitive-guide-to-allselected/
@pablonunalvares5391
@pablonunalvares5391 2 жыл бұрын
Didn't think of that... So KEEPFILTER does an operation similar to an INNER JOIN and blank out the others, while ALLSELECTED simply build the operation and override the existing filters... I'll have to take that one into account while building my DAX from now on...
@SQLBI
@SQLBI 2 жыл бұрын
You described the result you see in this example, but not how the two functions works internally - be careful, the result is different in other scenarios!
@karannchew2534
@karannchew2534 Жыл бұрын
*Product [color] IN {Red, Blue Green}* Include only Red, Blue and Green colours, and ignore any filter of Product [color]. Trendy 2 *KEEPFILTERS ( Product [color] IN {Red, Blue Green} )* Applies any existing filter, and then apply other filter inside the bracket. Cascade. Intersect. *KEEPFILTERS ( typically another filter here)* Trendy 1 FILTER( ALLSELECTED( Product [color] ), Product [color] IN {Red, Blue Green} ) First, include whatever Product [color] selected in slicer, and ignore any other filter, then include Red, Blue, Green with IN.
@nidhisingh4973
@nidhisingh4973 8 ай бұрын
Thank you..what's the point of writing allselected filter if the Product [color] in {Red,Blue,Green} include only these colors and ignore any filter on Product[color] We will get this result without Allselected as well
When to use KEEPFILTERS over iterators
18:56
SQLBI
Рет қаралды 47 М.
Row Context in DAX
20:42
SQLBI
Рет қаралды 93 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 99 МЛН
1❤️
00:17
Nonomen ノノメン
Рет қаралды 12 МЛН
Luck Decides My Future Again 🍀🍀🍀 #katebrush #shorts
00:19
Kate Brush
Рет қаралды 8 МЛН
All Vs AllSelected Vs AllExcept | Power BI Dax Tutorial
9:53
PowerBI Zone
Рет қаралды 30 М.
Understanding context transition
18:25
SQLBI
Рет қаралды 64 М.
7 reasons DAX is not easy
26:35
SQLBI
Рет қаралды 41 М.
Filter Context in DAX
16:03
SQLBI
Рет қаралды 67 М.
Debugging DAX in Power BI with CONCATENATEX
9:38
Pragmatic Works
Рет қаралды 1,2 М.
Differences between GROUPBY and SUMMARIZE
28:30
SQLBI
Рет қаралды 33 М.
🚨 YOU'RE VISUALIZING YOUR DATA WRONG. And Here's Why...
17:11
Adam Finer - Learn BI Online
Рет қаралды 24 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,3 МЛН
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 321 М.
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 19 МЛН