MSPTDA 19: CALCULATE DAX Function & Filter Context & ALLSELECTED & KEEPFILTERS (50 Examples)
About
No channel description available.
Video Description
All 20 files used in video are available in this zipped folder: https://people.highline.edu/mgirvin/AllClasses/348/MSPTDA/Content/DAX/FilesUsedInVideo19.zip Download file individually at class web site: https://people.highline.edu/mgirvin/AllClasses/348/MSPTDA/Content/DAX/DAX.htm pfd notes for Video #19: https://people.highline.edu/mgirvin/AllClasses/348/MSPTDA/Content/DAX/019-MSPTDA-CALCULATE-FilterContext.pdf Comprehensive video about the CALCULATE DAX Function and how Filter Context works to calculate DAX Formulas in Power BI and in Excel Power Pivot. Comprehensive Microsoft Power Tools for Data Analysis Class, BI 348, taught by Mike Girvin, Excel MVP and Highline College Professor. Topics: 1. (00:15) Introduction 2. (01:27) Filter Context, First Look 3. (04:40) CALCULATE to change Filter Context with a Boolean Filter 4. (05:10) CALCULATE and CALCULATETABLE DAX Functions 5. (06:28) What is a Boolean Filter? 6. (08:00) First look at the Overwrite Operator in CALCULATE. Merge the Internal Filter Context and External Filter Context 7. (09:45) CALCULATETABLE to change Filter Context with a Boolean Filter 8. (11:25) CALCULATE to perform Context Transition 9. (13:17) All Measures have a Hidden CALCULATE Function 10. (14:20) Boolean Filter is always converted to a FILTER & ALL DAX Function construction 11. (17:22) DAX Studio to look at FILTER and ALL Equivalent for a Boolean Filter 12. (20:00) VALUES rather than ALL in first argument of FILTER 13. (22:05) VALUES Function to bring a Variable into a Formula and use it as a condition for a Boolean Filter 14. (24:22) AND Logical Test – 4 Examples 15. (26:18) Can NOT use two different columns in a Boolean Filters 16. (28:30) OR Logical Test Boolean Formulas 17. (30:33) Can NOT Directly Compare Two Columns as a Boolean Filter. Keystone Pricing Examples. 18. (33:20) DAX Studio to see how FILTER and ALL delivers a table where we directly compare two columns for a DAX Measure 19. (34:00) Can NOT use MIN or MAX or other aggregate functions as a condition for a Boolean Filter 20. (34:00) Frequency Distribution DAX Formula. Learn about the COUNTROWS Function 21. (43:07) ALL DAX Function & Grand Totals. Learn about the Remove Operator in ALL DAX Function when you use it in the Filter argument of CALCULATE 22. (47:42) Look at Data Model for Power BI File for looking more closely at the Overwrite Operator 23. (49:00) Overwrite Operation. Second look at the Overwrite Operator in CALCULATE. Merge the Internal Filter Context and External Filter Context into the Final Filter Context 24. (50:50) Reminder about ALL before we learn about ALLSELECTED. What is the problem that ALLSELECTED can solve? 25. (52:35) ALLSELECTED to create Grand Totals that respect the filtering in the PivotTable 26. (53:33) Context Transition is how ALLSELECTED gets to the Grand Total Cell Filter Context 27. (53:45) Hidden Context Transition for Measures in an Excel PivotTable or Power BI Visual 28. (54:45) ALLSELECTED and Context Transition, the Full Story 29. (56:17) Visual Example of when ALLSELECTED will not get back to the Filter Context of the Grand Total Cell in the Excel PivotTable or Power BI Visual 30. (57:18) Use ALLSELECTED DAX Function in CALCULATE Measures 31. (59:05) ALLSELECTED Functions works on Cross Tab Reports too ! 32. (59:44) Example of Measure in Power BI Visual that uses ALLSELECTED and will not get back to the Filter Context of the Grand Total Cell Power BI Visual 33. (01:01:20) Look at new Data Model for next example 34. (01:02:20)First example of the KEEPFILTERS DAX Function to force an AND Logical Test rather than an Overwrite Operation 35. (01:06:55) What is a Complex Filter? What is a Complex Filter Reduction Error? 36. (01:08:56) How KEEPFILTERS can help solve a Complex Filter Reduction Error for Year Column in AVERAGEX. 37. (01:14:47) Why KEEPFILTERS is used in the New Quick Measure in Power BI 38. (01:16:33) How KEEPFILTERS can help solve a Complex Filter Reduction Error for Year Column and Month Column in CROSSJOIN in AVERAGEX 39. (01:18:30) Data Model solution to solve Complex Filter Reduction Error 40. (01:20:05) Determine if a filter is a complex filter with CROSSJOIN 41. (01:21:17) Expanded Table Concept & Relationships. 42. (01:26:50) Table Filters & Expanded Table as filters in the Filter argument of CALCULATE 43. (01:27:15) Expanded Table Filter with ALL Function. 2 Examples 44. (01:29:15) Table Filter to send a filter backwards across a Many-To-One Relationship. Great Visual for understanding this filter 45. (01:33:10) ALLEXCEPT DAX Function with an Expanded Column 46. (01:37:00) Examples of Time Intelligence Functions 47. (01:37:20) Measure for Revenue from Last Year. SAMPERIODLASTYEAR 48. (01:38:40) Measure for Revenue for Last Month. DATEADD and ISFILTERED DAX Functions 49. (01:41:32) Compare Excel and DAX Formulas 50. (01:43:10) Measure for % Change using IF, BLANK, DIVIDE and HASONEVALUE DAX Functions 51. (01:46:15) DAX Formula Evaluation Context Summary
Upgrade Your Everyday
AI-recommended products based on this video

Kasa Smart Outdoor Smart Plug by TP-Link (KP400) - Smart WiFi Outlet with 2 Sockets, IP64 Waterproof, Works with Alexa and Google Home, 2.4GHz WiFi Required, No Hub Required, Sunset & Sunrise Offset

Wireless Earbuds, Sports Bluetooth Headphones, 80Hrs Playtime Ear Buds with LED Power Display, Noise Canceling Headset, IPX7 Waterproof Earphones for Workout/Running Z(Black)

Monster Wireless Earbuds, Bluetooth 5.4 in Ear Stereo Headphones, Built-in Mic for Crystal Clear Call, 32H Playtime, Comfortable Fit, Fast Charging, Waterproof Earphones for Sports, Black

Wireless Earbuds, Sports Bluetooth Headphones, 80Hrs Playtime Ear Buds with LED Power Display, Noise Canceling Headset, IPX7 Waterproof Earphones for Workout/Running Z(Black)

Monster N-Lite 217 Wireless Earbuds, Immersive Stereo Sound, Bluetooth 6.0 in-Ear Headphones, Built-in Smart Noise Cancelling Mic for Clear Calls, Comfortable Fit, 32H Playtime, IPX6 Waterproof, Black

Brita Stainless Steel Premium Filtering Water Bottle, BPA-Free, Reusable, Insulated, Replaces 300 Plastic Water Bottles, Filter Lasts 2 Months or 40 Gallons, Includes 1 Filter, Carbon - 20 oz.

Simple Modern Filtered Water Bottle | Insulated Stainless-Steel Carbon Filter Travel Water Bottles | Reusable for Clean Drinking Water On The Go | 24oz, Sea Glass Sage

FITVII Health & Fitness Tracker (Answer/Make Calls), Smart Watch with 24/7 Heart Rate and Blood Pressure, Sleep Tracking Monitor, 120+ Sport Mode Activity Tracker

AYATAHA AYATAHA Smart Watch for Kids, Smartwatch Fitness Tracker for Boys Girls, Children's Activity Watch 37 Sports Modes SMS Notification, HD Full Touchscreen IP67 Waterproof, Blue

Iaret Iaret Smart Watch for Women, 1.83" HD Fitness Tracker with 4 Bands, Answer/Make Calls, Heart Rate/Sleep/SpO2/Step Tracking, 100+ Sport Modes, Android/iPhone Compatible Gift (Rose Gold)

Smart Watch for Men Women 1.8" Fitness Tracker, Bluetooth Call, DIY Dial, Heart Rate Sleep Blood Oxygen Monitor, 100+ Sports Modes, IP68 Waterproof Smartwatch for Android iPhone, Alexa Built-in

Hand Warmers 2 Pack, 14000mAh Rechargeable Hand Warmers, Electric Hand Warmer Reusable, Portable Power Bank USB Hand Warmers 4 Levels 8 Heating, Gifts for Raynauds Ski Golf Camping

Hand Warmers Rechargeable, 10000mAh Electric Heated Gloves Power Bank Portable Graphene Handwarmers Pouch with 3 Levels & Double-Sided Heating for Hunting Camping Golf Xmas Gifts for Women Men Kids

2Pack Rechargeable Hand Warmer, 8000mAh Electric Hand Warmer Power Bank, Portable USB-C Hand Warmer for Pocket, Reusable Hand Warmer Up to 8 hrs Each, Warm Gift for Men Women, for Hunting, Camping

GTOCE Portable Charger,40000mAh Power Bank with 22.5W Fast Charging LED Digital Display Battery Pack with 6 Outputs 2 Inputs, Type C Powerbank Portable Charger for iPhone 16 pro Samsung AirPods,Black

Monster Sleep Ear200, Wireless in-Ear Headphones, Bluetooth 6.0 Sleep Headphones, with ANC Active Noise Cancellation Designed for Side Sleepers, 30 Hours of bass Stereo Sound.

Monster Sleep Ear100 Ear Buds, Sleep Earbuds with Stereo Sound, Design for Side Sleeper, 32H Playtime, Bluetooth 6.0, ENC Noise Cancelling, IPX6 Waterproof Mini Headphones, White

Monster Sleep Ear100 Ear Buds, Sleep Earbuds with Stereo Sound, Design for Side Sleeper, 32H Playtime, Bluetooth 6.0, ENC Noise Cancelling, IPX6 Waterproof Mini Headphones, Black

Monster Sleep Ear100 Ear Buds, Sleep Earbuds with Stereo Sound, Design for Side Sleeper, 32H Playtime, Bluetooth 6.0, ENC Noise Cancelling, IPX6 Waterproof Mini Headphones, Black

Hydroponics Growing System Indoor Garden - Herb Garden with Grow Light, 15 Pods Stainless Steel Indoor Garden Kit, Auto Timer, Gardening Gift for All Ages

Umbra Triflora Hanging Planter for Window, Indoor Herb Garden, Set of 5, White/Black

Large Hydroponics Growing System 14 Pods, Indoor Herb Garden with LED Grow Light, 5L Water Tank, Hydroponic Grow Kit with 3 Auto-Timers, Rotatable Light Panel and Child Lock for Home School Gardening

Hanging Planter Hanging Plant Holder, 6 Inch 4 Indoor Plant Pots, Wall/Window Plant Hanger Indoor Herb Garden

slopehill Multi Hair Stylers & Hair Straightener - 2 in 1 Wet to Dry Air Straightener and Hair Dryer Combo with High Speed Air + Rapid Heat-Up + Customizable Temperature(Pink)

Hi.FANCY Portable Laptop Stand with Dual Cooling Fans for 14-17inch Laptops, Grey, 23.5 x 25.9 x 0.95cm

Laptop Stand for Desk, Adjustable Laptop Riser ABS+Silicone Foldable Portable Laptop Holder, Ventilated Cooling Notebook Stand for 10-15.6” Laptops,Tablet-Black

JETech 5 in 1 Case for Samsung Galaxy S25 Ultra 5G with 2-Pack Each Tempered Glass Screen Protector and Camera Lens Protector, Non-Yellowing Shockproof Bumper Phone Cover (Clear)

TAURI for iPhone 17 Pro Max Case 6.9" with 1-Pack Screen Protector, Camera Lens Full Protection, Military-Grade Protection, Shockproof Transparent Back Bumper Phone Cover - Clear Global Recycled Standard

TAURI for iPhone 17 Pro Case 6.3" with 1-Pack Screen Protector, Camera Lens Full Protection, Military-Grade Protection, Shockproof Transparent Back Bumper Phone Cover - Clear Global Recycled Standard

JOINPAYA 1Set Rechargeable Hand Warmer Hand Heater for Winter Heating Levels Compact

Shakven Rechargeable Hand Warmer | Cute Comfortable Portable Hand Warmers,Ergonomic Adjustable Energy-Efficient Small Heater for Travel, Outdoor, Winter

OCOOPA IP45 Waterproof Hand Warmer Rechargeable, Up to 15hrs Heat,10000mAh Durable Quick Charge Electric Hand Heater, PD Compatible, 3 Levels for Outdoors, Heavy Duty, H01-PD PRO



















