All language subtitles for 004 DAX Query View (November 2023)_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,000 --> 00:00:01,000 Instructor: Microsoft just dropped 2 00:00:01,000 --> 00:00:04,000 the November, 2023 updates for Power BI 3 00:00:04,000 --> 00:00:06,000 and there's some really cool stuff in here. 4 00:00:06,000 --> 00:00:09,000 And one of the things that I really wanna check out 5 00:00:09,000 --> 00:00:11,000 is this brand new DAX query view. 6 00:00:12,000 --> 00:00:14,000 All right, so this DAX query view, 7 00:00:14,000 --> 00:00:18,000 it's a brand new fourth view that's currently in preview. 8 00:00:18,000 --> 00:00:20,000 So if you're not seeing it yet, make sure 9 00:00:20,000 --> 00:00:21,000 that you're running the November version 10 00:00:21,000 --> 00:00:24,000 and have turned on this preview feature. 11 00:00:25,000 --> 00:00:28,000 But basically, the DAX query view allows you 12 00:00:28,000 --> 00:00:30,000 to use powerful DAX query expressions 13 00:00:30,000 --> 00:00:33,000 and keywords to explore, analyze 14 00:00:33,000 --> 00:00:35,000 and view data in your model without needing 15 00:00:35,000 --> 00:00:39,000 to build visualizations, which is seriously cool. 16 00:00:39,000 --> 00:00:40,000 So there are a few things 17 00:00:40,000 --> 00:00:42,000 to keep in mind with this new feature. 18 00:00:42,000 --> 00:00:46,000 First up, all DAX queries need to return a table. 19 00:00:46,000 --> 00:00:48,000 So you just can't write a measure expression 20 00:00:48,000 --> 00:00:52,000 that returns a scale our value and expect it to work. 21 00:00:52,000 --> 00:00:53,000 Second, to create a query, 22 00:00:53,000 --> 00:00:57,000 the only required keyword is evaluate. 23 00:00:57,000 --> 00:01:00,000 And while evaluate is the only required keyword, 24 00:01:00,000 --> 00:01:02,000 there are actually a bunch of other keywords 25 00:01:02,000 --> 00:01:05,000 that can be used to return data, like order by 26 00:01:05,000 --> 00:01:08,000 start at, define, measure, 27 00:01:08,000 --> 00:01:11,000 VAR for variable, table or column. 28 00:01:11,000 --> 00:01:13,000 So depending on the type of data that you're looking 29 00:01:13,000 --> 00:01:16,000 to return and how you want it ordered or structured, 30 00:01:16,000 --> 00:01:20,000 you're gonna use a combination of these different keywords. 31 00:01:20,000 --> 00:01:22,000 Now if you're looking to explore measures, 32 00:01:22,000 --> 00:01:24,000 then you're gonna want to use the measure keyword 33 00:01:24,000 --> 00:01:26,000 in conjunction with define, 34 00:01:26,000 --> 00:01:28,000 and that'll help you do just that. 35 00:01:28,000 --> 00:01:30,000 So we're gonna jump over to Power BI 36 00:01:30,000 --> 00:01:32,000 and let's take a look at this in action. 37 00:01:32,000 --> 00:01:35,000 All right, so we're in this new DAX query view 38 00:01:35,000 --> 00:01:38,000 and the interface looks very familiar. 39 00:01:38,000 --> 00:01:41,000 We've got our home, help and external tool tabs here 40 00:01:41,000 --> 00:01:42,000 from our home menu. 41 00:01:42,000 --> 00:01:45,000 We've got some different and new options here. 42 00:01:45,000 --> 00:01:47,000 So we can format the query, 43 00:01:47,000 --> 00:01:50,000 comment and uncomment, find, replace. 44 00:01:50,000 --> 00:01:52,000 And then we have this command palette. 45 00:01:52,000 --> 00:01:56,000 Over on the right-hand side here, we've got our data pane 46 00:01:56,000 --> 00:01:59,000 with their table view and then the new semantic model view. 47 00:02:00,000 --> 00:02:05,000 In the center, we have our query and query results windows. 48 00:02:05,000 --> 00:02:08,000 So we'll type in our DAX queries up top 49 00:02:08,000 --> 00:02:11,000 and then we'll see the results window down at the bottom. 50 00:02:11,000 --> 00:02:13,000 And then we have additional tabs. 51 00:02:13,000 --> 00:02:15,000 So anytime we create a new query 52 00:02:15,000 --> 00:02:17,000 or run a new query, we'll create a new tab 53 00:02:17,000 --> 00:02:19,000 down here at the bottom. 54 00:02:19,000 --> 00:02:22,000 So all in all, a super familiar layout. 55 00:02:23,000 --> 00:02:26,000 Now let's take a look at our first example here. 56 00:02:26,000 --> 00:02:27,000 When I first opened up Power BI, 57 00:02:27,000 --> 00:02:30,000 this was populated by default. 58 00:02:30,000 --> 00:02:33,000 So if we click run, we see 59 00:02:33,000 --> 00:02:36,000 that we are evaluating the top 100 rows 60 00:02:36,000 --> 00:02:38,000 of our calendar table. 61 00:02:38,000 --> 00:02:39,000 So we can look at the result here. 62 00:02:39,000 --> 00:02:43,000 We've got our date start a year, start of month, 63 00:02:43,000 --> 00:02:47,000 and then start of week columns for the first 100 rows. 64 00:02:47,000 --> 00:02:49,000 So what happens if we wanna explore 65 00:02:49,000 --> 00:02:51,000 our orders table a little bit? 66 00:02:51,000 --> 00:02:53,000 So there's actually this brand new feature 67 00:02:53,000 --> 00:02:57,000 called Quick Queries that if you right click the header 68 00:02:57,000 --> 00:03:00,000 and come up to quick queries, we can show the top 100. 69 00:03:00,000 --> 00:03:03,000 So similar to that top end function we just used, right? 70 00:03:03,000 --> 00:03:08,000 And that returns the top 100 records of our orders table. 71 00:03:08,000 --> 00:03:12,000 And this is ordered by the order ID it's sending. 72 00:03:12,000 --> 00:03:14,000 So that's how it's determining that. 73 00:03:14,000 --> 00:03:17,000 The other quick query option that we have 74 00:03:17,000 --> 00:03:21,000 and right-click come up is our column statistics. 75 00:03:21,000 --> 00:03:23,000 And this is pretty cool 76 00:03:23,000 --> 00:03:27,000 because it actually creates kind of some column profiling 77 00:03:27,000 --> 00:03:31,000 and statistics of your data tables right here 78 00:03:31,000 --> 00:03:34,000 in kind of the front end of Power BI. 79 00:03:34,000 --> 00:03:36,000 So while the query editor, data profiling 80 00:03:36,000 --> 00:03:39,000 and QA tools are phenomenal, it's actually kinda nice 81 00:03:39,000 --> 00:03:41,000 to be able to have this right here 82 00:03:41,000 --> 00:03:43,000 in the front end of Power BI. 83 00:03:43,000 --> 00:03:46,000 So you can see we generate this brand new table. 84 00:03:46,000 --> 00:03:49,000 We have things like counts and distinct count, 85 00:03:49,000 --> 00:03:53,000 min, max, medians, means, standard deviations, 86 00:03:53,000 --> 00:03:55,000 odds, evens, quartiles 87 00:03:56,000 --> 00:03:59,000 range in days, range in months and so on. 88 00:03:59,000 --> 00:04:01,000 So we've got a bunch of different statistics 89 00:04:01,000 --> 00:04:03,000 about the columns within our table. 90 00:04:03,000 --> 00:04:05,000 So this is great, but what if we wanted 91 00:04:05,000 --> 00:04:08,000 to create our own query to return a table? 92 00:04:09,000 --> 00:04:11,000 So if we add a new query 93 00:04:11,000 --> 00:04:16,000 and let's just evaluate our orders fact table. 94 00:04:18,000 --> 00:04:19,000 Click Run, 95 00:04:20,000 --> 00:04:25,000 and we get all of the columns from the order fact table. 96 00:04:26,000 --> 00:04:29,000 Again, this is pretty cool, pretty straightforward. 97 00:04:29,000 --> 00:04:31,000 Again, this isn't giving us anything different 98 00:04:31,000 --> 00:04:33,000 than we couldn't get from our table view here, 99 00:04:33,000 --> 00:04:37,000 but what if we wanted to see the individual customers 100 00:04:37,000 --> 00:04:40,000 and their corresponding order volume, right? 101 00:04:40,000 --> 00:04:43,000 So we have all of our customers here, 102 00:04:43,000 --> 00:04:47,000 but each record represents an order, an individual order. 103 00:04:47,000 --> 00:04:49,000 So what if we wanted to kinda aggregate this 104 00:04:49,000 --> 00:04:51,000 or group it? 105 00:04:51,000 --> 00:04:53,000 So we can come back to our query here 106 00:04:54,000 --> 00:04:59,000 and we're gonna add in a summarized columns function. 107 00:04:59,000 --> 00:05:00,000 And what we want to do here is we want 108 00:05:00,000 --> 00:05:03,000 to summarize the columns 109 00:05:03,000 --> 00:05:06,000 and we're gonna base this on the customer ID. 110 00:05:06,000 --> 00:05:11,000 And we're gonna create a new column for orders 111 00:05:11,000 --> 00:05:15,000 where we're gonna sum the order quantity 112 00:05:15,000 --> 00:05:17,000 for every record within the table. 113 00:05:17,000 --> 00:05:20,000 So we're gonna sum this for our fact table 114 00:05:20,000 --> 00:05:22,000 and then quantity. 115 00:05:23,000 --> 00:05:24,000 Close out our parentheses there, 116 00:05:24,000 --> 00:05:27,000 close out our parentheses for the function, 117 00:05:27,000 --> 00:05:28,000 and then we can hit Run. 118 00:05:29,000 --> 00:05:30,000 So perfect. 119 00:05:30,000 --> 00:05:34,000 So now we have our orders by our unique customers. 120 00:05:34,000 --> 00:05:36,000 And then the last thing that we could do here is let's say 121 00:05:36,000 --> 00:05:39,000 we wanted to add in an order by clause, 122 00:05:39,000 --> 00:05:42,000 we could add in order by orders. 123 00:05:43,000 --> 00:05:45,000 Scroll down here, you should be able to see that 124 00:05:45,000 --> 00:05:46,000 a little bit better. 125 00:05:46,000 --> 00:05:50,000 So orders, this is the calculated column we just created 126 00:05:50,000 --> 00:05:52,000 and we wanna do this descending 127 00:05:52,000 --> 00:05:55,000 so we have the highest values first. 128 00:05:57,000 --> 00:05:59,000 Update that, and there you go. 129 00:05:59,000 --> 00:06:01,000 So we just created this table 130 00:06:01,000 --> 00:06:05,000 with a calculated column based on the order volume 131 00:06:05,000 --> 00:06:08,000 within our orders fact table. 132 00:06:08,000 --> 00:06:10,000 And needless to say, I'm sure 133 00:06:10,000 --> 00:06:12,000 you're kind of wheels are spinning at this point, 134 00:06:12,000 --> 00:06:15,000 there are a bunch of different options that you can employ 135 00:06:15,000 --> 00:06:17,000 to create and explore tables. 136 00:06:17,000 --> 00:06:19,000 And you know, sky is really the limit here 137 00:06:19,000 --> 00:06:22,000 as long as you're returning a table at the end of the day. 138 00:06:22,000 --> 00:06:26,000 But what if you wanted to evaluate a measure? 139 00:06:26,000 --> 00:06:27,000 So let's dig into that 140 00:06:27,000 --> 00:06:30,000 because the syntax is a little bit different. 141 00:06:30,000 --> 00:06:32,000 So we will create a new query here. 142 00:06:32,000 --> 00:06:33,000 And the first thing that we need to do 143 00:06:33,000 --> 00:06:35,000 is start off with define. 144 00:06:35,000 --> 00:06:37,000 So whenever we're creating a measure, we first need 145 00:06:37,000 --> 00:06:41,000 to define that and we use the measure keyword, 146 00:06:41,000 --> 00:06:44,000 and I want all of my measures 147 00:06:44,000 --> 00:06:46,000 to live within my measures table. 148 00:06:46,000 --> 00:06:48,000 I have this blank placeholder here, 149 00:06:48,000 --> 00:06:50,000 but I wanna make sure that all of my measures 150 00:06:50,000 --> 00:06:52,000 end up living within this table. 151 00:06:52,000 --> 00:06:54,000 So I'm gonna create this 152 00:06:54,000 --> 00:06:58,000 and we're gonna reference the measures table. 153 00:07:01,000 --> 00:07:03,000 We're gonna call those Total Orders. 154 00:07:05,000 --> 00:07:09,000 And this is going to = COUNTROWS(VALUES) 155 00:07:11,000 --> 00:07:14,000 which is basically the distinct count 156 00:07:14,000 --> 00:07:18,000 of our order ID, right? 157 00:07:18,000 --> 00:07:21,000 And we'll close out our parentheses there. 158 00:07:21,000 --> 00:07:23,000 So we've got our measure defined. 159 00:07:23,000 --> 00:07:25,000 One of the cool things that ends up happening here 160 00:07:25,000 --> 00:07:28,000 when you're creating new measures is you actually have 161 00:07:28,000 --> 00:07:31,000 the option to add these into your data model. 162 00:07:31,000 --> 00:07:33,000 So you see this little message appeared, 163 00:07:33,000 --> 00:07:36,000 update data model add new measure. 164 00:07:36,000 --> 00:07:39,000 If we were to click this, it's gonna add it into the table 165 00:07:39,000 --> 00:07:41,000 that we've defined here in the first part 166 00:07:41,000 --> 00:07:43,000 of our measure keyword. 167 00:07:44,000 --> 00:07:46,000 So we're gonna wait until we see the results, 168 00:07:46,000 --> 00:07:48,000 but like I had said earlier, 169 00:07:48,000 --> 00:07:51,000 we have to have our evaluate keyword. 170 00:07:51,000 --> 00:07:52,000 So let's add that in. 171 00:07:53,000 --> 00:07:54,000 And then we're gonna use 172 00:07:54,000 --> 00:07:57,000 our summarized columns option again. 173 00:07:57,000 --> 00:07:59,000 Again, we'll create a little bit more space. 174 00:08:00,000 --> 00:08:05,000 And let's say that I wanna look at all of my orders 175 00:08:05,000 --> 00:08:07,000 by my different categories, right? 176 00:08:07,000 --> 00:08:10,000 So instead of looking at this by customers, 177 00:08:10,000 --> 00:08:13,000 let's actually look at these different orders by category. 178 00:08:13,000 --> 00:08:18,000 So we're gonna reference the categories lookup 179 00:08:18,000 --> 00:08:19,000 and the category name. 180 00:08:19,000 --> 00:08:22,000 So this is the column that we first wanna group by. 181 00:08:23,000 --> 00:08:27,000 And then from here, we're gonna look at total orders 182 00:08:27,000 --> 00:08:30,000 and we can reference the total orders measure 183 00:08:30,000 --> 00:08:33,000 that we just created and click Run. 184 00:08:33,000 --> 00:08:37,000 So we've got this total orders measure by our distinct 185 00:08:37,000 --> 00:08:38,000 or unique categories. 186 00:08:40,000 --> 00:08:41,000 So that's super cool. 187 00:08:41,000 --> 00:08:43,000 And say everything looks good, 188 00:08:43,000 --> 00:08:45,000 we wanna add this into the data model, 189 00:08:45,000 --> 00:08:47,000 we'll click add new measure, 190 00:08:47,000 --> 00:08:49,000 confirm that we wanna do this. 191 00:08:50,000 --> 00:08:53,000 And then in a moment here, we're gonna see it populate 192 00:08:53,000 --> 00:08:54,000 in our measures table. 193 00:08:55,000 --> 00:08:56,000 Awesome. 194 00:08:56,000 --> 00:08:59,000 Do a little bit of hygiene, I'll delete 195 00:08:59,000 --> 00:09:01,000 this placeholder column from the model. 196 00:09:04,000 --> 00:09:08,000 And now we've got our measures table populated up here. 197 00:09:08,000 --> 00:09:11,000 Now what's really cool here as well, is if you wanted 198 00:09:11,000 --> 00:09:14,000 to add in an additional measure, all we need to do 199 00:09:14,000 --> 00:09:18,000 is just add in another measure line item below this. 200 00:09:18,000 --> 00:09:20,000 So we'll use our MEASURE keyword again, 201 00:09:21,000 --> 00:09:24,000 and then we'll type a Measures Table. 202 00:09:24,000 --> 00:09:26,000 And we're gonna define a new measure at this point 203 00:09:26,000 --> 00:09:29,000 for Quantity Sold, right? 204 00:09:29,000 --> 00:09:32,000 And this is going to = SUM('ORDERS (Fact)'[Quantity]). 205 00:09:36,000 --> 00:09:39,000 And again, we'll make a little bit of space here. 206 00:09:39,000 --> 00:09:42,000 And now that I have my measure defined up here, 207 00:09:42,000 --> 00:09:47,000 all I need to do is add it into my summarized columns list. 208 00:09:47,000 --> 00:09:51,000 So total, or we'll call this quantity sold perhaps. 209 00:09:53,000 --> 00:09:55,000 Quantity Sold. 210 00:09:55,000 --> 00:09:57,000 And again, I can reference the measure I just created. 211 00:09:59,000 --> 00:10:00,000 We'll run the query. 212 00:10:00,000 --> 00:10:02,000 And now I have a three column table 213 00:10:02,000 --> 00:10:06,000 with my category name, total orders, and quantity sold. 214 00:10:06,000 --> 00:10:08,000 Again, if everything looks good here, 215 00:10:08,000 --> 00:10:10,000 we can update the model 216 00:10:10,000 --> 00:10:13,000 and we're gonna add this into our measures table. 217 00:10:13,000 --> 00:10:15,000 And let's say you had a different table that you wanted 218 00:10:15,000 --> 00:10:17,000 to add these measures to. 219 00:10:17,000 --> 00:10:19,000 Maybe you group things a little bit differently. 220 00:10:19,000 --> 00:10:23,000 You can just change the table reference at the start 221 00:10:23,000 --> 00:10:25,000 of the measure definition here, 222 00:10:25,000 --> 00:10:28,000 and it's gonna add it into that table if you want. 223 00:10:28,000 --> 00:10:31,000 All right, so that's kind of a quick exploration 224 00:10:31,000 --> 00:10:33,000 of the new DAX query view. 225 00:10:33,000 --> 00:10:35,000 And like you've seen, there's a ton of different stuff 226 00:10:35,000 --> 00:10:37,000 that you can do within this view, 227 00:10:37,000 --> 00:10:38,000 and I'm really excited to see 228 00:10:38,000 --> 00:10:42,000 what else the Power BI team releases for this new feature. 229 00:10:42,000 --> 00:10:44,000 But what do you think? 230 00:10:44,000 --> 00:10:45,000 Do you think this will be helpful in your DAX 231 00:10:45,000 --> 00:10:47,000 and report development? 232 00:10:47,000 --> 00:10:48,000 Let me know what you think 233 00:10:48,000 --> 00:10:51,000 and how you're planning on using the new DAX query view. 18491

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.