Ravindra BagaleCourses & study guides मराठी Track your progress

13. DAX: Data Analysis Expressions

Friends, now the most important module – DAX. It may feel a bit hard at the start, but do not worry; with practice it becomes easy. In this module we look at evaluation context (the filters and row a formula sees), CALCULATE, FILTER, the ALL family, time intelligence, RANKX and variables (a value stored for a moment) on Blinkit data. Type every formula yourself.

What you will learn in this module

  • Calculated columns vs measures – a recap (details in Module 8)
  • Row context, filter context and context transition
  • DAX syntax, data types and operators
  • The most important DAX functions with Blinkit and Amazon Now examples
  • Quick-commerce KPIs: AOV, Avg Delivery Time, % Delivered Under 10 Mins, Cancellation Rate, Repeat Customer %
  • Time intelligence: YTD, last year, YoY %, running total, moving average
  • Ranking with RANKX and TOPN, and writing clean DAX with variables

Live story: The Monday KPI cards

Suppose we are preparing the Blinkit Maharashtra monthly report for March. The state head wants five cards: Total Sales, Orders, AOV, % delivered under 10 minutes, and cancel rate. She also wants a Pune benchmark card while she looks at Nashik, and FY year-to-date from April. All of that is DAX. This chapter goes slowly: data first, then the formula, then the result.

All numbers in this story are fictional practice data.

Concepts in this chapter

  1. 13.1What is DAX?
  2. 13.2Calculated Columns vs Measures (Recap)
  3. 13.3Evaluation Context
  4. 13.4DAX Syntax
  5. 13.5Base Measures for the Quick-Commerce Model
  6. 13.6Aggregation Functions
  7. 13.7Logical Functions
  8. 13.8CALCULATE – The Most Important Function
  9. 13.9FILTER
  10. 13.10ALL, ALLEXCEPT, REMOVEFILTERS, ALLSELECTED
  11. 13.11RELATED and RELATEDTABLE
  12. 13.12USERELATIONSHIP
  13. 13.13VALUES, SELECTEDVALUE, HASONEVALUE
  14. 13.14Text Functions
  15. 13.15Date Functions
  16. 13.16Time Intelligence
  17. 13.17Ranking: RANKX and TOPN
  18. 13.18Variables: VAR and RETURN
  19. 13.19Other Useful Functions
  20. 13.20PREVIOUSMONTH, PREVIOUSYEAR, DATESMTD and Rolling 30 and 90 Days
  21. 13.21KEEPFILTERS, and How a Slicer Hits a Measure
  22. 13.22LOOKUPVALUE, TREATAS and CROSSFILTER
  23. 13.23Virtual Tables
  24. 13.24Weighted Averages and FILTER inside an Iterator
  25. 13.25IFERROR, Blank versus Zero, and Circular Dependency
  26. 13.26Dynamic Segmentation, Pareto and ABC
  27. 13.27DAX Query View

Review and practice

  1. ★Practice and Answer Key: DAX Measures and CALCULATE

The chapter recap is at the end of the last concept page.

Ravi Sir's Cards: 37 revision, interview and comparison cards for this chapter · मराठी cards