Posts

Showing posts from June, 2022

When to use KEEPFILTERS over iterators

https://www.youtube.com/watch?v=bGVLguWf4Ls   Article:  https://www.sqlbi.com/articles/when-to-use-keepfilters-over-iterators/

The Definitive Guide to ALLSELECTED

  https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/ ALLSELECTED  can either return a table or it can remove filters and restore a previous filter context. In both cases, it does so by accessing and using the last shadow filter context left by an iterator on the stack of filter contexts.

Optimizing an old SQLBI Article (AND logic in slicers) – Unplugged #4 (18:10)

https://www.sqlbi.com/tv/optimizing-an-old-sqlbi-article-and-logic-in-slicers-unplugged-4/   Rewrite old code: VAR NumOfSelectedCategories = COUNTROWS(VALUES('Product'[Category])) VAR CustomersAndCategories = SUMMARIZE(Sales, Sales[CustomerKey], Product[Category]) VAR CustomersWithNumCategories = GROUPBY(CustomerAndCategories, "@Categories",  SUMX(CURRENTGROUP(), 1)) VAR Result = COUNTROWS(FILTER(CustomersWithNumCategories, [@NumCategories] = NumOfSelectedCategories)) RETURN Result

Using OR conditions between slicers in DAX (22:42)

https://www.youtube.com/watch?v=l5JX3G5Ntzk Create a filter by CROSSJOIN VALUES() and ALL(). VALUES picks up the slicer selection(s) and ALL() returns everything UNION the CROSSJOIN results

Computing Running Totals in DAX (5:05)

https://www.sqlbi.com/articles/computing-running-totals-in-dax/  

Summing Values for the Total (4:15)

https://www.sqlbi.com/articles/summing-values-for-the-total/   Compute the number of working days where Sales > 0

Using KEEPFILTERS in DAX (14:22)

https://www.sqlbi.com/articles/using-keepfilters-in-dax-updated/  

Filter Context in DAX (16:03)

https://www.sqlbi.com/articles/filter-context-in-dax/  

Row Context in DAX (20:42)

https://www.sqlbi.com/articles/row-context-in-dax/  

Understanding Context Transition in DAX

https://www.sqlbi.com/articles/understanding-context-transition-in-dax/