32. Keyboard Shortcuts and DAX Cheat Sheet
32.3 Common Measure Patterns (Copy & Adapt)
Total Orders = DISTINCTCOUNT(Orders[Order ID])
AOV = DIVIDE([Total Sales], [Delivered Orders])
Cancel Rate = DIVIDE([Cancelled Orders], [Total Orders])
Avg Deliv Mins = AVERAGEX(VALUES(Orders[Order ID]),
CALCULATE(MAX(Orders[Delivery Time Mins])))
% Under 10 Mins = DIVIDE(CALCULATE([Delivered Orders],
Orders[Delivery Time Mins] <= 10), [Delivered Orders])
% of Total = DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(Product)))
Sales LY = CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date]))
YoY % = DIVIDE([Total Sales] - [Sales LY], [Sales LY])
Sales YTD = TOTALYTD([Total Sales], 'Date'[Date])
Running Total = CALCULATE([Total Sales],
FILTER(ALL('Date'[Date]), 'Date'[Date] <= MAX('Date'[Date])))
Rolling 12M = CALCULATE([Total Sales],
DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -12, MONTH))
Rank = RANKX(ALL(Product[Product Name]), [Total Sales], , DESC, DENSE)
Top 5 Sales = CALCULATE([Total Sales], TOPN(5, ALL(Product[Product Name]), [Total Sales]))
Selected Item = SELECTEDVALUE(DarkStore[City], "All Cities")
Delivered Sales = CALCULATE([Total Sales],
USERELATIONSHIP(Orders[Delivered Date], 'Date'[Date]))
Ravindra Bagale's Tip
Friends, many students copy a measure pattern and forget to change the table and column names to match their model. After pasting, read every reference and replace it, then test the measure with a slicer before using it in the report. This matters for both exams and interviews.
Ravindra Bagale's Tip – मराठी
मित्रांनो, बरेच students measure pattern copy करतात आणि त्यांच्या model नुसार table आणि column names बदलायला विसरतात. Paste केल्यानंतर प्रत्येक reference वाचा आणि बदला, मग report मध्ये वापरण्याआधी slicer सोबत measure test करा. हे exam आणि interview दोन्हीसाठी important आहे.
Ravindra Bagale's Tip – हिंदी
दोस्तों, बहुत से students measure pattern copy करते हैं और अपने model के हिसाब से table और column names बदलना भूल जाते हैं. Paste करने के बाद हर reference पढ़ो और बदलो, फिर report में इस्तेमाल करने से पहले slicer के साथ measure test करो. यह exam और interview दोनों के लिए ज़रूरी है.
Thodkyaat sangaycha tar (quick recap)
Roj vaparnar te thodech shortcuts savayit aana, aani pattern copy kelyavar table aani column chi nava tumchya model pramane badla. Aata shevti glossary.