Download presentation
Presentation is loading. Please wait.
1
WELCOME Howzit Sawubona
2
PATTERNS FOR NON-NUMERIC MEASURES IN DAX
WHO NEEDS NUMBERS? PATTERNS FOR NON-NUMERIC MEASURES IN DAX James McGillivray
3
SESSION OBJECTIVES Understand the Concept Learn the Patterns
What we hope to achieve Introduction to the idea of Non-Numeric Measures; WHAT they are, WHY they are useful, and WHEN they can be used. Understand the Concept Starting with simple BOOLEAN, to complex TOP OF CATEGORY measures, learn the DAX PATTERNS used to add Non-Numeric Measures to your data models. Learn the Patterns View Non-Numeric measures in action, with DEMOS in both POWER BI and SSAS TABULAR. See the Value
4
How we plan to achieve it
AGENDA How we plan to achieve it Presenter 1 What 2 Why 3 When 4 Single Value 5 UNDERSTAND Multiple Values 6 Table Based 7 SSAS 8 Power BI 9 Questions 10 LEARN SEE
5
In this slide there is a background placeholder
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. About the Presenter
6
FROM SOUTH AFRICA WITH LOVE
About Me Professional 10 Years BI Experience Microsoft Certified SQL User Group Johannesburg, South Africa Personal Sport: Cricket, Soccer, Squash, Running Slowly. Culture: Symphony Choir of Johannesburg, Musical Theatre Other: Board Games, Poker James McGillivray / BI Architect @JamesMcG_MSBI TheJimmyRSA
7
What is a Non-Numeric Measure?
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. What is a Non-Numeric Measure?
8
WHAT IS A NON-NUMERIC MEASURE?
When numbers just won’t do WHAT LEAST WHERE WHICH Measures WHO AVERAGE “..you must define a measure whenever you want to display the resulting calculation values that reflect user selections and see them in the values area of a pivot table, or the plot area of a chart..” SQLBI Y/N T/F TOTAL WHEN MOST
9
WHAT IS A NON-NUMERIC MEASURE?
When numbers just won’t do Simple Non-Numeric Measures Complex/Custom Non-Numeric Measures Measures How to What else? “..you must define a measure whenever you want to display the resulting calculation values that reflect user selections and see them in the values area of a pivot table, or the plot area of a chart..” SQLBI Measures can accept any DAX calculation. To create a non-numeric measure, simply write a DAX calculation which returns a Non-Numeric data type. Boolean Simple to implement. Easy to understand. Date MIN and MAX both work on dates as on any numeric value. Text is not aggregate-able. Any Non-Numeric measure which returns a text value has to be custom written. It’s not yet possible to create image or media type measures. I can imagine situations in which they would add tremendous value, so hopefully one day it will be possible. A good decision is based on knowledge not on numbers
10
Why would I use a Non-Numeric Measure?
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Why would I use a Non-Numeric Measure?
11
Just because you can, doesn’t mean you should
WHY WOULD I USE ONE? Just because you can, doesn’t mean you should Visualizations are wonderful, but occasionally, the real estate cost of a visual is disproportionate to the value added. Space is always at a premium REAL-ESTATE Non-Numeric Measures do not require any interpretation. Users can quickly assess the information without any possibility of misunderstanding. The Ultimate Sophistication ADAPTABLE SIMPLICITY All DAX Measures are context specific, and Non-Numeric Measures are no exception. This allows us to add tremendous value to our information delivery. Context Specific
12
When should I use a Non-Numeric Measure?
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. When should I use a Non-Numeric Measure?
13
There’s a time and place
WHEN SHOULD I USE ONE? There’s a time and place Best Performers Text value indicating the best (or worst) performing item in a group. Custom KPI Boolean value representing whether a target was met or not. Reduce Interpretation Creativity is the key to success in the great and primary education where our teachers can bring creativity. Most Recent Occurrence MAX(Date) shows the most recent date on which the specified event occurred Bucketing Group values into descriptive buckets for range based measures.
14
Single Valued Non-Numeric Measures
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Single Valued Non-Numeric Measures
15
Everything should be made as simple as possible, but not simpler
BASIC DAX FORMULAS Everything should be made as simple as possible, but not simpler Boolean =[Population] > T/F Earliest Occurrence =MIN([Sales Date]) MIN Most Recent Event =MAX([Store Opening Date]) MAX
16
Multiple Valued Non-Numeric Measures
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Multiple Valued Non-Numeric Measures
17
Start and End Ranges per Bucket
BUCKETING Grouping Wide Ranges of Measure Values VALUES() Wrap the calculation in a calculate function because you are using Measures for your filter CALCULATE() Hopefully Wow Your Customers Get the distinct list Start and End Ranges per Bucket RANGE TABLE FILTER() Voila Compare to the start and end ranges by using && Return your useful, context specific, measure.
18
TOP (AND BOTTOM) PERFORMERS
The most practical and useful of Non-Numeric Measures TOPN ({N-Value}; {Column}; {Measure}; {Sort Order}) MEASURE CAN ONLY RETURN SINGLE VALUE A measure can only return a single, scalar value, not a table. TOPN can return a table in the case of ties. Return the top {N} {Column} records based on the {Measure} sorted by the {Sort Order} TOPN SINGLE VALUES #ERROR# CONCATENATEX VALUES() CONCATENATEX ({Table}, {Column}, {Delimiter}) To use distinct values, use the VALUES() function to group on a record. Concatenate the values in the {column} in {table}, delimited by {delimiter}
19
Context Switching Non-Numeric Measures
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Context Switching Non-Numeric Measures
20
Pick the Appropriate Path
CONTEXT SWITCHING Choosing Different Measures Depending on the Filter Context HASONEVALUE() HASONEFILTER() Etc. Analyze Filter Context Use Measures within Measures Pick the Appropriate Path
21
Non-Numeric Measures in SSAS Tabular
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Non-Numeric Measures in SSAS Tabular
22
DEMO
23
Non-Numeric Measures in Power BI
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Non-Numeric Measures in Power BI
24
DEMO
25
Questions @JamesMcG_MSBI TheJimmyRSA
In this slide there is a background placeholder. Click to the small icon on the center of the slide and choose an image from computer. When add an image, you must sent it to back with Right Click on Image -> Send to Back -> Send to Back. Questions @JamesMcG_MSBI TheJimmyRSA
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.