Power BI - Astuces pour mieux écrire son code DAX Tutoriels

Apprenez à mieux écrire votre code DAX pour Microsoft 365 avec cette vidéo. Mettez en œuvre des statistiques, des fonctions d'axe, de la katanation de texte et d'extraction d'informations pour améliorer la lecture et le format de vos mesures. Utilisez des variables et des fonctions à l'intérieur d'autres fonctions.

  • 7:14
  • 1071 vues
00:00:00
Félicitations, vous êtes arrivé au bout
00:00:02
de toutes les fonctions d'axe que je
00:00:04
je souhaitais vous faire découvrir.
00:00:06
Donc on en a vu pas mal.
00:00:07
Vous êtes très bien armé pour
00:00:09
créer vos premières fonctions en
00:00:11
Dax et donc vos premières mesures.
00:00:13
On a vu des statistiques de
00:00:15
la caténation de texte,
00:00:16
extraction d'informations,
00:00:17
de date aller chercher des colonnes
00:00:19
qui sont en relation via des
00:00:21
liaisons sur d'autres tables,
00:00:22
et cetera et cetera.
00:00:24
La seule difficulté que
00:00:25
vous pourriez rencontrer,
00:00:27
c'est quand vous êtes sur des fonctions
00:00:29
qui vont utiliser des fonctions à
00:00:31
l'intérieur d'autres fonctions,
00:00:33
et cetera.
00:00:33
Et ça peut vite devenir un petit peu
00:00:35
compliqué à lire ce que ça va faire.
00:00:36
Une expression extrêmement longue
00:00:38
avec beaucoup de parenthèses.
00:00:39
On en a vu un certaine qui étaient
00:00:41
assez compliquées à lire.
00:00:42
Et donc ici,
00:00:43
je voulais vous donner une ou 2
00:00:44
astuces pour que vous puissiez être
00:00:46
un peu plus à l'aise et notamment
00:00:48
écrire votre formule potentiellement
00:00:50
sur plusieurs lignes pour avoir une
00:00:52
lecture un petit peu plus fluide.
00:00:53
Donc pour ça on va aller créer
00:00:55
une nouvelle mesure promise,
00:00:56
c'est l'avant dernière fois que je dis
00:00:59
cette phrase. Voilà, et on va juste.
00:01:01
Alors là on va faire quelque
00:01:04
chose de très simple alors.
00:01:06
Très bien.
00:01:08
Tac,
00:01:08
on va du coup juste créer une
00:01:11
mesure qui va s'appeler mon code.
00:01:14
Est-ce que je serai de vous montrer ?
00:01:15
C'est la possibilité de revenir à
00:01:17
la ligne que je vous disais aussi
00:01:18
de pouvoir créer des variables.
00:01:20
Donc pour revenir à la ligne,
00:01:21
qu'est-ce que je vais faire ?
00:01:22
Et bien je vais aller maintenir alt
00:01:23
sur mon clavier et aller cliquer
00:01:25
sur entrée qui va me permettre
00:01:26
ici de faire comme vous l'avez vu,
00:01:28
un retour à la ligne.
00:01:29
J'ai la possibilité de créer des
00:01:31
variables donc souvenez-vous
00:01:32
dans Power Curry,
00:01:32
on avait également créer des variables,
00:01:34
on voit que le terme apparaît
00:01:36
en bleu donc signe que,
00:01:37
Eh bien il y a une interaction qui est
00:01:40
faite avec le langage Dax et on va.
00:01:43
Créer par exemple valeur une.
00:01:45
Donc on voit que le nom de la
00:01:48
variable apparaît en apparaît en vert,
00:01:50
on va y placer par exemple la valeur 3.
00:01:53
On va à nouveau revenir à la ligne,
00:01:55
créer une nouvelle valeur.
00:01:59
Alors 2 qui va être égal 2.
00:02:03
Et finalement indiquer ce qu'on souhait
00:02:05
de retourner comme valeur par rapport à ça.
00:02:07
Donc par exemple ici Var.
00:02:10
Total qui va être égal à valeur.
00:02:14
…?
00:02:14
Donc,
00:02:14
comme vous voyez ici maintenant,
00:02:15
il me le propose multiplié par valeur.
00:02:21
De.
00:02:21
Et finalement indiquer la valeur
00:02:23
que je souhaite récupérer par
00:02:25
rapport à tout ce qui calcule,
00:02:26
donc on va utiliser le mot clé return
00:02:30
et lui demander de nous retourner
00:02:31
le total ici donc ça ressemble
00:02:32
beaucoup au pouvoir que je vous
00:02:34
avais montré sur la fin pour tout
00:02:36
ce qui est création de fonctions.
00:02:37
Où là on va vraiment pouvoir
00:02:39
espacer notre code, là,
00:02:41
errer,
00:02:41
et donc potentiellement avoir
00:02:42
beaucoup plus de facilité
00:02:43
à le lire quand vous reviendrez dessus plus
00:02:45
tard, on va aller ici fait l'idée, ça.
00:02:50
Et de regarder ce que ça donne,
00:02:52
alors mon code,
00:02:53
où est-ce qu'il s'est placé ?
00:02:54
Ben là, tout simplement en première position.
00:02:57
Et on voit que, avec grand étonnement,
00:02:59
il va me retourner.
00:03:00
La valeur 6 donc je sais que c'est un
00:03:03
peu déroutant d'aller encore mettre
00:03:04
du code dans des fonctions mais c'est
00:03:07
réellement un conseil que je vous
00:03:08
donne quand vous allez être sur des
00:03:10
choses très enfin très complexes,
00:03:11
des choses plus complexes ou en tout cas
00:03:13
il y a beaucoup plus de d'imbrication.
00:03:15
Mettez plus d'étapes dans votre
00:03:16
code puisque à un instant t ça va
00:03:18
être très clair pour vous quand
00:03:19
vous allez revenir 15 jours après,
00:03:20
vous allez plus comprendre la fonction
00:03:22
que vous utilisez et c'est dommage
00:03:23
parce que vous y avez potentiellement
00:03:24
passé plusieurs dizaines de minutes,
00:03:26
voire plusieurs heures.
00:03:28
Un exemple un peu plus concret pour
00:03:30
que vous puissiez voir ce qu'on peut
00:03:31
faire de ce type de manipulation,
00:03:33
c'est d'aller calculer quelque
00:03:35
chose d'assez simple,
00:03:36
donc on va déjà aller calculer la
00:03:39
moyenne de participation à nos festivals,
00:03:41
donc ça,
00:03:41
on l'a déjà vu avec la fonction
00:03:43
average et après aller s'amuser à
00:03:45
calculer le nombre de festivals qui
00:03:47
sont au-dessus de cette moyenne.
00:03:50
Justement pour voir un petit peu le la,
00:03:52
la différence qu'on pouvait avoir avec
00:03:53
la médiane et la moyenne que je vous disais,
00:03:55
il y avait une petite différence,
00:03:56
donc on va aller ici.
00:03:57
Calculer le. Nombre de festivals
00:03:59
au-dessus de cette moyenne.
00:04:01
Donc on va aller créer,
00:04:03
vous vous en doutez, une nouvelle mesure.
00:04:07
Promis, c'est la dernière.
00:04:10
Pour de vrai. Une nouvelle mesure ?
00:04:13
Où on va l'appeler nombre de
00:04:15
festivals au-dessus de la moyenne.
00:04:28
Voilà. Et donc on va utiliser alt.
00:04:31
Retour à la ligne.
00:04:33
On va créer une première variable
00:04:36
qu'on va appeler moyenne.
00:04:38
Qui est égal à la fonction à rage.
00:04:42
De festival 2018.
00:04:50
Ici et on va créer une 2e
00:04:53
ligne qui va s'appeler Var.
00:04:57
Au-dessus ?
00:05:01
Qui va s'appeler,
00:05:02
qui va utiliser la méthode calculate,
00:05:04
donc, qui permet ici, alors je crois
00:05:05
qu’on ne l’avait même pas vu celle-là,
00:05:06
donc ça vaut le coup.
00:05:07
Donc en gros c'est une fonction qui
00:05:08
va permettre d'activer plusieurs
00:05:09
filtres successifs sur une valeur.
00:05:11
Donc nous on va juste en appétit
00:05:13
un donc lui ce qu'on souhaite c'est
00:05:15
aller calculer le nombre de festivals
00:05:17
au-dessus de la moyenne donc ici on
00:05:19
va aller chercher encore une fois.
00:05:20
Festival. 2018.
00:05:26
Et ensuite on va lui appliquer
00:05:27
notre film donc à savoir festival
00:05:29
qui est au-dessus de la moyenne.
00:05:39
Au-dessus donc là on va mettre le Chevron
00:05:41
fermant et on va les chercher la moyenne,
00:05:44
donc la fonction qu'on avait,
00:05:45
la variable qu'on a créée auparavant.
00:05:48
Qu'on va refermer et on va utiliser une
00:05:50
dernière étape qui va indiquer de retourner.
00:05:58
Au-dessus ?
00:06:03
Et comme on le voit ici,
00:06:04
c'est une méthode assez simple,
00:06:06
pour aller à filtrer sur donc ces
00:06:08
festivals qui sont au-dessus et donc
00:06:11
dans calculer les, le nombre de valeurs.
00:06:14
Et donc d'aller aérer un peu plus notre code.
00:06:17
Comme je vous le disais auparavant,
00:06:18
et donc de mettre aussi des noms
00:06:19
de variables explicites, ce qui,
00:06:20
ce qui rendra d'autant plus
00:06:22
compréhensible le code qui en résultera.
00:06:29
On va ici. Ajouter cet élément.
00:06:33
On va le transformer et donc on
00:06:35
se retrouve avec cette valeur-là.
00:06:37
Donc 1552 festivals.
00:06:40
Qui se retrouvent au-dessus de notre moyenne.
00:06:44
Alors voilà, on en a fini
00:06:46
avec les fonctions d'axe,
00:06:47
comme je vous le disais, de toute façon,
00:06:48
on ne les aura pas tout vu,
00:06:50
sinon ça aurait pris encore des heures
00:06:51
et ce n’est pas l'objectif et ayez le
00:06:53
réflexe d'aller dans la documentation
00:06:54
de Power BI pour aller potentiellement
00:06:56
un petit peu comme pour Cory.
00:06:58
Si vous avez un besoin d'aller
00:06:59
chercher la bonne fonction qui
00:07:01
vous permettra de le faire,
00:07:02
il y en a quand je vous disais
00:07:04
énormément et aussi d'aller sur les
00:07:05
Forums ou du coup globalement,
00:07:07
vous aurez toujours quelqu'un
00:07:08
de bon conseil pour vous dire
00:07:10
quelle fonction est à utiliser
00:07:12
en fonction de votre cas d'usage.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Congratulations, you have reached the end
00:00:02
of all the axis functions I
00:00:04
I wanted you to discover.
00:00:06
So we've seen quite a few.
00:00:07
You are very well equipped for
00:00:09
Create your first functions in
00:00:11
Dax and therefore your first measurements.
00:00:13
We have seen statistics from
00:00:15
text katenation,
00:00:16
information extraction,
00:00:17
date fetch columns
00:00:19
who are related through
00:00:21
links to other tables,
00:00:22
et cetera et cetera.
00:00:24
The only difficulty that
00:00:25
you might meet,
00:00:27
This is when you are on functions
00:00:29
that will use functions to
00:00:31
the interior of other functions,
00:00:33
and so forth.
00:00:33
And it can quickly become a little bit
00:00:35
Complicated to read what it's going to do.
00:00:36
An extremely long expression
00:00:38
with many parentheses.
00:00:39
We saw some of them that were
00:00:41
quite complicated to read.
00:00:42
And so here,
00:00:43
I wanted to give you one or 2
00:00:44
Tips for you to be
00:00:46
a little more comfortable and especially
00:00:48
write your formula potentially
00:00:50
on several lines to have a
00:00:52
Play a little more fluid.
00:00:53
So for that we're going to create
00:00:55
a new promised measure,
00:00:56
This is the penultimate time I say
00:00:59
this sentence. That's it, and we're just going.
00:01:01
So here we will do something
00:01:04
Very simple thing then.
00:01:06
Very well.
00:01:08
Tock
00:01:08
So we're just going to create a
00:01:11
measure that will be called my code.
00:01:14
Will I show you?
00:01:15
This is the possibility to return to
00:01:17
The line I was telling you too
00:01:18
to be able to create variables.
00:01:20
So going back to the line,
00:01:21
What am I going to do?
00:01:22
Well, I'm going to go maintain alt
00:01:23
on my keyboard and go click
00:01:25
on entry that will allow me
00:01:26
here to do as you have seen,
00:01:28
a line break.
00:01:29
I have the possibility to create
00:01:31
variables so remember
00:01:32
in Power Curry,
00:01:32
variables had also been created,
00:01:34
We see that the term appears
00:01:36
in blue therefore sign that,
00:01:37
Well there is an interaction that is
00:01:40
made with the Dax language and we go.
00:01:43
For example, create a value.
00:01:45
So we see that the name of the
00:01:48
variable appears in green,
00:01:50
We will place for example the value 3.
00:01:53
We'll go back to the line again,
00:01:55
Create new value.
00:01:59
Then 2 which will be equal 2.
00:02:03
And finally indicate what we want
00:02:05
to return as value in relation to that.
00:02:07
So for example here Var.
00:02:10
Total that will be equal to value.
00:02:14
Huh?
00:02:14
Therefore
00:02:14
As you see here now,
00:02:15
He offers it to me multiplied by value.
00:02:21
From.
00:02:21
And finally indicate the value
00:02:23
that I want to recover by
00:02:25
relation to everything that calculates,
00:02:26
So we're going to use the keyword return
00:02:30
and ask him to return us
00:02:31
The total here so it looks like
00:02:32
much to the power that I you
00:02:34
had shown on the end for everything
00:02:36
which is creating functions.
00:02:37
Where we will really be able
00:02:39
space out our code, there,
00:02:41
wander
00:02:41
and therefore potentially have
00:02:42
much easier
00:02:43
to read it when you come back to it more
00:02:45
Late, we'll go here made the idea, that.
00:02:50
And to look at what it gives,
00:02:52
so my code,
00:02:53
Where did he place himself?
00:02:54
Well, there, simply in first position.
00:02:57
And we see that, with great astonishment,
00:02:59
He's going to turn me around.
00:03:00
The value 6 so I know it's a
00:03:03
Not confusing to go and put
00:03:04
code in functions but it is
00:03:07
really a piece of advice that I tell you
00:03:08
Give when you're going to be on
00:03:10
very complex things,
00:03:11
more complex things or at least
00:03:13
There is a lot more nesting.
00:03:15
Put more steps in your
00:03:16
code since at a moment t it goes
00:03:18
be very clear to you when
00:03:19
you will come back 15 days later,
00:03:20
You will understand the function more
00:03:22
that you use and it's a shame
00:03:23
because you potentially have
00:03:24
spent several tens of minutes,
00:03:26
or even several hours.
00:03:28
A slightly more concrete example for
00:03:30
that you can see what we can
00:03:31
make this type of manipulation,
00:03:33
it is to go and calculate something
00:03:35
Quite simple,
00:03:36
So we're already going to calculate the
00:03:39
average participation in our festivals,
00:03:41
So this,
00:03:41
We have already seen this with the function
00:03:43
average and after go have fun at
00:03:45
calculate the number of festivals that
00:03:47
are above this average.
00:03:50
Just to see a little bit of the la,
00:03:52
The difference we could have with
00:03:53
the median and the mean I was telling you,
00:03:55
there was a small difference,
00:03:56
So we're going to go here.
00:03:57
Calculate the. Number of festivals
00:03:59
above this average.
00:04:01
So we're going to create,
00:04:03
As you can imagine, a new measure.
00:04:07
I promise, it's the last one.
00:04:10
For real. A new measure?
00:04:13
Where we will call it number of
00:04:15
Above average festivals.
00:04:28
There you go. And so we're going to use alt.
00:04:31
Line break.
00:04:33
We will create a first variable
00:04:36
which we will call average.
00:04:38
Which is equal to the function to rage.
00:04:42
Festival 2018.
00:04:50
Here and we will create a 2nd
00:04:53
line that will be called Var.
00:04:57
Above?
00:05:01
Who will be called,
00:05:02
who will use the calculate method,
00:05:04
So, who allows here, then I believe
00:05:05
that we hadn't even seen that one,
00:05:06
So it's worth it.
00:05:07
So basically it's a function that
00:05:08
will allow you to activate several
00:05:09
successive filters on a value.
00:05:11
So we just go up an appetite
00:05:13
So he what we want is
00:05:15
Go and calculate the number of festivals
00:05:17
above average so here we
00:05:19
will go get it again.
00:05:20
Festival. 2018.
00:05:26
And then we will apply it
00:05:27
Our film so namely festival
00:05:29
which is above average.
00:05:39
Above so there we will put the Chevron
00:05:41
closing and we will look for them the average,
00:05:44
so the function we had,
00:05:45
the variable we created before.
00:05:48
That we will close and we will use a
00:05:50
Last step that will indicate to return.
00:05:58
Above?
00:06:03
And as seen here,
00:06:04
It's a pretty simple method, huh,
00:06:06
to go to filter on so these
00:06:08
festivals that are above and therefore
00:06:11
In Calculate them, the number of values.
00:06:14
And so to go and ventilate our code a little more.
00:06:17
As I said before,
00:06:18
and therefore also to put names
00:06:19
explicit variables, which,
00:06:20
which will make all the more
00:06:22
understandable the resulting code.
00:06:29
We're going here. Add this item.
00:06:33
We will transform it and so we
00:06:35
ends up with that value.
00:06:37
So 1552 festivals.
00:06:40
Which are above our average.
00:06:44
So here we go.
00:06:46
with axis functions,
00:06:47
As I said, anyway,
00:06:48
we will not have seen them all,
00:06:50
otherwise it would have taken hours
00:06:51
and that's not the goal and have the
00:06:53
reflex to go to the documentation
00:06:54
of Power BI to potentially go
00:06:56
a little bit like Cory.
00:06:58
If you have a need to go
00:06:59
look for the right function that
00:07:01
will allow you to do so,
00:07:02
there are some when I told you
00:07:04
enormously and also to go on the
00:07:05
Forums eh or suddenly, globally,
00:07:07
you will always have someone
00:07:08
good advice to tell you
00:07:10
which function is to be used
00:07:12
depending on your use case.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Herzlichen Glückwunsch, Sie haben das Ende erreicht
00:00:02
aller Achsfunktionen I
00:00:04
Ich wollte, dass du es entdeckst.
00:00:06
Wir haben also schon einiges gesehen.
00:00:07
Sie sind sehr gut gerüstet für
00:00:09
Erstellen Sie Ihre ersten Funktionen in
00:00:11
Dax und damit Ihre ersten Messungen.
00:00:13
Wir haben Statistiken von
00:00:15
Textkatenierung,
00:00:16
Informationsextraktion,
00:00:17
Spalten zum Abrufen von Datumsabrufen
00:00:19
die durch
00:00:21
Links zu anderen Tabellen,
00:00:22
et cetera et cetera.
00:00:24
Die einzige Schwierigkeit, die
00:00:25
Sie könnten sich treffen,
00:00:27
Dies ist, wenn Sie auf Funktionen sind
00:00:29
, die Funktionen verwendet, um
00:00:31
das Innere anderer Funktionen,
00:00:33
und so weiter.
00:00:33
Und es kann schnell ein bisschen werden
00:00:35
Kompliziert zu lesen, was es tun wird.
00:00:36
Ein extrem langer Ausdruck
00:00:38
mit vielen Klammern.
00:00:39
Wir sahen einige von ihnen, die
00:00:41
ziemlich kompliziert zu lesen.
00:00:42
Und so hier,
00:00:43
Ich wollte Ihnen ein oder 2 geben
00:00:44
Tipps für Sie
00:00:46
etwas komfortabler und vor allem
00:00:48
Schreiben Sie Ihre Formel potentiell
00:00:50
auf mehreren Linien, um eine
00:00:52
Spielen Sie etwas flüssiger.
00:00:53
Dafür werden wir
00:00:55
eine neue versprochene Maßnahme,
00:00:56
Dies ist das vorletzte Mal, dass ich sage
00:00:59
Dieser Satz. Das war's, und wir gehen einfach.
00:01:01
Hier werden wir also etwas tun
00:01:04
Sehr einfache Sache also.
00:01:06
Sehr gut.
00:01:08
Tock
00:01:08
Also werden wir einfach eine
00:01:11
Measure, die als My Code bezeichnet wird.
00:01:14
Werde ich es Ihnen zeigen?
00:01:15
Dies ist die Möglichkeit, zu
00:01:17
Die Zeile, die ich dir auch gesagt habe
00:01:18
um Variablen erstellen zu können.
00:01:20
Also zurück zur Linie,
00:01:21
Was soll ich tun?
00:01:22
Nun, ich werde alt beibehalten
00:01:23
auf meiner Tastatur und klicken Sie auf
00:01:25
bei der Einreise, die mir erlaubt
00:01:26
hier, um zu tun, was Sie gesehen haben,
00:01:28
Ein Zeilenumbruch.
00:01:29
Ich habe die Möglichkeit,
00:01:31
Variablen, also denken Sie daran
00:01:32
in Power Curry,
00:01:32
Außerdem wurden Variablen angelegt,
00:01:34
Wir sehen, dass der Begriff erscheint
00:01:36
in blau unterschreiben Sie daher, dass
00:01:37
Nun, es gibt eine Interaktion, die
00:01:40
mit der Dax-Sprache gemacht und los geht's.
00:01:43
Erstellen Sie beispielsweise einen Wert.
00:01:45
Wir sehen also, dass der Name der
00:01:48
Variable wird grün angezeigt,
00:01:50
Wir setzen zum Beispiel den Wert 3.
00:01:53
Wir gehen wieder zurück zur Linie,
00:01:55
Schaffen Sie neue Werte.
00:01:59
Dann 2, was gleich 2 ist.
00:02:03
Und schließlich angeben, was wir wollen
00:02:05
als Wert in Bezug darauf zurückzugeben.
00:02:07
So zum Beispiel hier Var.
00:02:10
Summe, die gleich dem Wert ist.
00:02:14
Hä?
00:02:14
Deshalb
00:02:14
Wie Sie jetzt hier sehen,
00:02:15
Er bietet es mir multipliziert mit dem Wert an.
00:02:21
Von.
00:02:21
Und schließlich den Wert angeben
00:02:23
die ich wiederherstellen möchte
00:02:25
Beziehung zu allem, was berechnet,
00:02:26
Also werden wir das Keyword return verwenden
00:02:30
und bitten Sie ihn, uns zurückzugeben
00:02:31
Die Summe hier, so sieht es aus wie
00:02:32
sehr zu der Macht, die ich dir
00:02:34
hatte am Ende für alles gezeigt
00:02:36
die Funktionen erstellt.
00:02:37
Wo wir wirklich in der Lage sein werden
00:02:39
Räumen Sie unseren Code aus, dort,
00:02:41
wandern
00:02:41
und haben daher potentiell
00:02:42
viel einfacher
00:02:43
um es zu lesen, wenn Sie darauf zurückkommen mehr
00:02:45
Spät, wir werden hier gehen machte die Idee, dass.
00:02:50
Und zu sehen, was es gibt,
00:02:52
also mein Code,
00:02:53
Wo hat er sich platziert?
00:02:54
Nun, da, einfach an erster Stelle.
00:02:57
Und wir sehen mit großem Erstaunen,
00:02:59
Er wird mich umdrehen.
00:03:00
Der Wert 6, also weiß ich, dass es ein
00:03:03
Nicht verwirrend zu gehen und zu setzen
00:03:04
Code in Funktionen, aber es ist
00:03:07
wirklich ein Ratschlag, den ich Ihnen sage
00:03:08
Geben Sie, wenn Sie auf
00:03:10
sehr komplexe Dinge,
00:03:11
komplexere Dinge oder zumindest
00:03:13
Es gibt viel mehr Nesting.
00:03:15
Setzen Sie mehr Schritte in Ihre
00:03:16
Code, da es in einem Moment t geht
00:03:18
Seien Sie sich sehr klar, wenn
00:03:19
Sie werden 15 Tage später wiederkommen,
00:03:20
Sie werden die Funktion besser verstehen
00:03:22
die Sie verwenden und es ist eine Schande
00:03:23
weil Sie potentiell
00:03:24
mehrere zehn Minuten verbracht hat,
00:03:26
oder sogar mehrere Stunden.
00:03:28
Ein etwas konkreteres Beispiel für
00:03:30
dass Sie sehen können, was wir können
00:03:31
diese Art der Manipulation vornehmen,
00:03:33
Es geht darum, etwas zu berechnen
00:03:35
Ganz einfach,
00:03:36
Wir werden also bereits die
00:03:39
durchschnittliche Teilnahme an unseren Festivals,
00:03:41
Also das,
00:03:41
Das haben wir bereits bei der Funktion
00:03:43
Durchschnittlich und After Go Viel Spaß bei
00:03:45
Berechnen Sie die Anzahl der Festivals, die
00:03:47
liegen über diesem Durchschnitt.
00:03:50
Nur um ein wenig von der la zu sehen,
00:03:52
Der Unterschied, den wir mit
00:03:53
der Median und der Mittelwert, den ich dir sagte,
00:03:55
Es gab einen kleinen Unterschied,
00:03:56
Also gehen wir hierher.
00:03:57
Berechnen Sie die. Anzahl der Festivals
00:03:59
über diesem Durchschnitt.
00:04:01
Also werden wir schaffen,
00:04:03
Wie Sie sich vorstellen können, eine neue Maßnahme.
00:04:07
Ich verspreche, es ist das letzte.
00:04:10
Wahr. Eine neue Maßnahme?
00:04:13
Wo wir es nennen werden Zahl der
00:04:15
Überdurchschnittliche Festivals.
00:04:28
Bitte schön. Und so werden wir alt verwenden.
00:04:31
Zeilenumbruch.
00:04:33
Wir erstellen eine erste Variable
00:04:36
die wir als durchschnittlich bezeichnen werden.
00:04:38
Das ist gleich der Funktion zu wüten.
00:04:42
Festival 2018.
00:04:50
Hier und wir werden eine 2. erstellen
00:04:53
Linie, die Var.
00:04:57
Über?
00:05:01
Wer aufgerufen wird,
00:05:02
wer die Berechnungsmethode verwendet,
00:05:04
Also, wer erlaubt hier, dann glaube ich
00:05:05
dass wir das noch nicht einmal gesehen hatten,
00:05:06
Es lohnt sich also.
00:05:07
Im Grunde ist es also eine Funktion, die
00:05:08
ermöglicht es Ihnen, mehrere zu aktivieren
00:05:09
aufeinanderfolgende Filter für einen Wert.
00:05:11
Also machen wir einfach Appetit
00:05:13
Was wir also wollen, ist
00:05:15
Gehen Sie und berechnen Sie die Anzahl der Festivals
00:05:17
überdurchschnittlich hoch also hier
00:05:19
werde es wieder holen.
00:05:20
Fest. 2018.
00:05:26
Und dann werden wir es anwenden
00:05:27
Unser Film so nämlich Festival
00:05:29
was überdurchschnittlich ist.
00:05:39
Oben, also werden wir den Chevron platzieren
00:05:41
schließen und wir werden nach ihnen den Durchschnitt suchen,
00:05:44
also die Funktion, die wir hatten,
00:05:45
die Variable, die wir zuvor erstellt haben.
00:05:48
Dass wir schließen und wir werden eine
00:05:50
Letzter Schritt, der anzeigt, zurückzukehren.
00:05:58
Über?
00:06:03
Und wie hier zu sehen,
00:06:04
Es ist eine ziemlich einfache Methode, hm,
00:06:06
, um zu filtern, so dass diese
00:06:08
Festivals, die oben sind und daher
00:06:11
In Berechnen Sie sie die Anzahl der Werte.
00:06:14
Und so gehen Sie und lüften unseren Code ein wenig mehr.
00:06:17
Wie ich bereits sagte,
00:06:18
und damit auch Namen zu setzen
00:06:19
explizite Variablen, die,
00:06:20
was umso mehr
00:06:22
Verständlicherweise der resultierende Code.
00:06:29
Wir gehen hierher. Fügen Sie dieses Element hinzu.
00:06:33
Wir werden es transformieren und so werden wir
00:06:35
endet mit diesem Wert.
00:06:37
Also 1552 Feste.
00:06:40
Die über unserem Durchschnitt liegen.
00:06:44
Also los geht's.
00:06:46
mit Achsfunktionen,
00:06:47
Wie gesagt, jedenfalls,
00:06:48
wir werden sie nicht alle gesehen haben,
00:06:50
sonst hätte es Stunden gedauert
00:06:51
Und das ist nicht das Ziel und haben die
00:06:53
Reflex, um zur Dokumentation zu gelangen
00:06:54
von Power BI, um möglicherweise zu gehen
00:06:56
ein bisschen wie Cory.
00:06:58
Wenn Sie ein Bedürfnis haben zu gehen
00:06:59
Suchen Sie nach der richtigen Funktion, die
00:07:01
wird Ihnen dies ermöglichen,
00:07:02
es gibt einige, als ich es dir gesagt habe
00:07:04
enorm und auch auf die
00:07:05
Foren eh oder plötzlich, global,
00:07:07
Sie werden immer jemanden haben
00:07:08
Guter Rat, um Ihnen zu sagen
00:07:10
welche Funktion verwendet werden soll
00:07:12
abhängig von Ihrem Anwendungsfall.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Enhorabuena, has llegado al final
00:00:02
de todas las funciones del eje I
00:00:04
Quería que lo descubrieras.
00:00:06
Así que hemos visto bastantes.
00:00:07
Estás muy bien equipado para
00:00:09
Crea tus primeras funciones en
00:00:11
Dax y por lo tanto sus primeras mediciones.
00:00:13
Hemos visto estadísticas de
00:00:15
katenation de texto,
00:00:16
extracción de información,
00:00:17
Columnas de recuperación de fecha
00:00:19
que están relacionados a través de
00:00:21
enlaces a otras tablas,
00:00:22
et cetera et cetera.
00:00:24
La única dificultad que
00:00:25
podrías conocerte,
00:00:27
Esto es cuando estás en funciones
00:00:29
que usará funciones para
00:00:31
el interior de otras funciones,
00:00:33
y así sucesivamente.
00:00:33
Y puede convertirse rápidamente en un poco
00:00:35
Complicado leer lo que va a hacer.
00:00:36
Una expresión extremadamente larga
00:00:38
con muchos paréntesis.
00:00:39
Vimos algunos de ellos que eran
00:00:41
Bastante complicado de leer.
00:00:42
Y así aquí,
00:00:43
Quería darte uno o 2
00:00:44
Consejos para que seas
00:00:46
un poco más cómodo y sobre todo
00:00:48
Escribe tu fórmula potencialmente
00:00:50
en varias líneas para tener un
00:00:52
Juega un poco más fluido.
00:00:53
Así que para eso vamos a crear
00:00:55
una nueva medida prometida,
00:00:56
Esta es la penúltima vez que digo
00:00:59
esta frase. Eso es todo, y simplemente nos vamos.
00:01:01
Así que aquí haremos algo
00:01:04
Cosa muy simple entonces.
00:01:06
Muy bien.
00:01:08
Tock
00:01:08
Así que vamos a crear un
00:01:11
Medida que se llamará Mi código.
00:01:14
¿Te lo mostraré?
00:01:15
Esta es la posibilidad de volver a
00:01:17
La línea que te estaba diciendo también
00:01:18
para poder crear variables.
00:01:20
Así que volviendo a la línea,
00:01:21
¿Qué voy a hacer?
00:01:22
Bueno, voy a ir a mantener alt
00:01:23
en mi teclado y vaya haga clic en
00:01:25
en la entrada que me permitirá
00:01:26
aquí para hacer lo que has visto,
00:01:28
un salto de línea.
00:01:29
Tengo la posibilidad de crear
00:01:31
variables así que recuerda
00:01:32
en Power Curry,
00:01:32
también se habían creado variables,
00:01:34
Vemos que aparece el término
00:01:36
en azul, por lo tanto, signo que,
00:01:37
Bueno, hay una interacción que es
00:01:40
hecho con el lenguaje Dax y listo.
00:01:43
Por ejemplo, cree un valor.
00:01:45
Así vemos que el nombre del
00:01:48
variable aparece en verde,
00:01:50
Colocaremos por ejemplo el valor 3.
00:01:53
Volveremos a la línea de nuevo,
00:01:55
Crear nuevo valor.
00:01:59
Entonces 2 que será igual a 2.
00:02:03
Y por último indicar lo que queremos
00:02:05
para devolver como valor en relación con eso.
00:02:07
Así por ejemplo aquí Var.
00:02:10
Total que será igual al valor.
00:02:14
¿Eh?
00:02:14
Por lo tanto
00:02:14
Como ven aquí ahora,
00:02:15
Él me lo ofrece multiplicado por el valor.
00:02:21
De.
00:02:21
Y finalmente indicar el valor
00:02:23
que quiero recuperar por
00:02:25
relación con todo lo que calcula,
00:02:26
Así que vamos a usar la palabra clave return
00:02:30
y pídele que nos devuelva
00:02:31
El total aquí para que parezca
00:02:32
mucho al poder que yo te
00:02:34
había mostrado al final para todo
00:02:36
que es crear funciones.
00:02:37
Donde realmente seremos capaces
00:02:39
espaciar nuestro código, allí,
00:02:41
vagar
00:02:41
y, por lo tanto, potencialmente tienen
00:02:42
Mucho más fácil
00:02:43
para leerlo cuando vuelvas a él más
00:02:45
Tarde, iremos aquí hecho la idea, eso.
00:02:50
Y para ver lo que da,
00:02:52
Así que mi código,
00:02:53
¿Dónde se colocó?
00:02:54
Bueno, allí, simplemente en primera posición.
00:02:57
Y vemos que, con gran asombro,
00:02:59
Él me va a dar la vuelta.
00:03:00
El valor 6 así que sé que es un
00:03:03
No es confuso ir y poner
00:03:04
código en funciones pero es
00:03:07
realmente un consejo que te cuento
00:03:08
Da cuando vayas a estar encendido
00:03:10
cosas muy complejas,
00:03:11
cosas más complejas o al menos
00:03:13
Hay mucho más anidamiento.
00:03:15
Pon más pasos en tu
00:03:16
código ya que en un momento t va
00:03:18
Sea muy claro para usted cuando
00:03:19
volverás 15 días después,
00:03:20
Entenderás más la función
00:03:22
que usas y es una pena
00:03:23
porque potencialmente tienes
00:03:24
pasó varias decenas de minutos,
00:03:26
o incluso varias horas.
00:03:28
Un ejemplo un poco más concreto para
00:03:30
que usted puede ver lo que nosotros podemos
00:03:31
hacer este tipo de manipulación,
00:03:33
Es ir y calcular algo
00:03:35
Muy simple,
00:03:36
Así que ya vamos a calcular el
00:03:39
participación media en nuestros festivales,
00:03:41
Así que esto,
00:03:41
Ya hemos visto esto con la función
00:03:43
promedio y después de ir divertirse en
00:03:45
Calcular el número de festivales que
00:03:47
están por encima de este promedio.
00:03:50
Solo para ver un poco de la,
00:03:52
La diferencia que podríamos tener con
00:03:53
la mediana y la media que te estaba diciendo,
00:03:55
había una pequeña diferencia,
00:03:56
Así que vamos a ir aquí.
00:03:57
Calcule el. Número de festivales
00:03:59
por encima de este promedio.
00:04:01
Así que vamos a crear,
00:04:03
Como puedes imaginar, una nueva medida.
00:04:07
Lo prometo, es el último.
00:04:10
De verdad. ¿Una nueva medida?
00:04:13
Donde lo llamaremos número de
00:04:15
Festivales por encima de la media.
00:04:28
Aquí tienes. Y entonces vamos a usar alt.
00:04:31
Salto de línea.
00:04:33
Crearemos una primera variable
00:04:36
que llamaremos promedio.
00:04:38
Que es igual a la función de rabia.
00:04:42
Festival 2018.
00:04:50
Aquí ya crearemos un 2º
00:04:53
línea que se llamará Var.
00:04:57
¿Encima?
00:05:01
Quién será llamado,
00:05:02
quién utilizará el método calcular,
00:05:04
Entonces, quién permite aquí, entonces creo
00:05:05
que ni siquiera habíamos visto esa,
00:05:06
Así que vale la pena.
00:05:07
Así que básicamente es una función que
00:05:08
le permitirá activar varios
00:05:09
filtros sucesivos en un valor.
00:05:11
Así que solo subimos el apetito
00:05:13
Así que lo que queremos es
00:05:15
Ve y calcula el número de festivales
00:05:17
por encima de la media, así que aquí
00:05:19
iré a buscarlo de nuevo.
00:05:20
Fiesta. 2018.
00:05:26
Y luego lo aplicaremos
00:05:27
Nuestra película tan concretamente festival
00:05:29
que está por encima de la media.
00:05:39
Arriba así que ahí pondremos el Chevron
00:05:41
cerrando y buscaremos para ellos el promedio,
00:05:44
Así que la función que teníamos,
00:05:45
La variable que creamos antes.
00:05:48
Que cerraremos y usaremos un
00:05:50
Último paso que te indicarán volver.
00:05:58
¿Encima?
00:06:03
Y como se ve aquí,
00:06:04
Es un método bastante simple, eh,
00:06:06
para ir a filtrar en por lo que estos
00:06:08
Festivales que están por encima y por lo tanto
00:06:11
En Calcularlos, el número de valores.
00:06:14
Y así ir y ventilar un poco más nuestro código.
00:06:17
Como dije antes,
00:06:18
y por lo tanto también para poner nombres
00:06:19
variables explícitas, que,
00:06:20
lo que hará aún más
00:06:22
comprensible el código resultante.
00:06:29
Vamos aquí. Agregue este elemento.
00:06:33
Lo transformaremos y así
00:06:35
termina con ese valor.
00:06:37
Así que 1552 festivales.
00:06:40
Que están por encima de nuestro promedio.
00:06:44
Así que aquí vamos.
00:06:46
con funciones de eje,
00:06:47
Como dije, de todos modos,
00:06:48
no los habremos visto todos,
00:06:50
de lo contrario habría tomado horas
00:06:51
Y ese no es el objetivo y tener el
00:06:53
Reflejo para ir a la documentación
00:06:54
de Power BI para potencialmente ir
00:06:56
un poco como Cory.
00:06:58
Si tienes la necesidad de ir
00:06:59
Busque la función correcta que
00:07:01
le permitirá hacerlo,
00:07:02
hay algunos cuando te lo dije
00:07:04
enormemente y también para ir en el
00:07:05
Foros eh o de repente, globalmente,
00:07:07
Siempre tendrás a alguien
00:07:08
Buen consejo para contarte
00:07:10
qué función se va a utilizar
00:07:12
dependiendo de su caso de uso.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Gefeliciteerd, je hebt het einde bereikt
00:00:02
van alle asfuncties I
00:00:04
Ik wilde dat je het ontdekte.
00:00:06
We hebben er dus nogal wat gezien.
00:00:07
Je bent zeer goed uitgerust voor
00:00:09
Creëer uw eerste functies in
00:00:11
Dax en dus je eerste metingen.
00:00:13
We hebben statistieken gezien van
00:00:15
tekst katenation,
00:00:16
informatie-extractie,
00:00:17
kolommen voor het ophalen van datum
00:00:19
die verwant zijn via
00:00:21
links naar andere tabellen,
00:00:22
et cetera et cetera.
00:00:24
De enige moeilijkheid die
00:00:25
misschien ontmoet je elkaar,
00:00:27
Dit is wanneer u functies gebruikt
00:00:29
die functies zullen gebruiken om
00:00:31
het interieur van andere functies,
00:00:33
enzovoort.
00:00:33
En het kan snel een beetje worden
00:00:35
Ingewikkeld om te lezen wat het gaat doen.
00:00:36
Een extreem lange uitdrukking
00:00:38
met veel haakjes.
00:00:39
We zagen een aantal van hen die
00:00:41
best ingewikkeld om te lezen.
00:00:42
En dus hier,
00:00:43
Ik wilde je er een of 2 geven
00:00:44
Tips voor jou om te zijn
00:00:46
iets comfortabeler en vooral
00:00:48
schrijf uw formule mogelijk
00:00:50
op verschillende lijnen om een
00:00:52
Speel wat vloeiender.
00:00:53
Dus daarvoor gaan we creëren
00:00:55
een nieuwe beloofde maatregel,
00:00:56
Dit is de voorlaatste keer zeg ik
00:00:59
deze zin. Dat is het, en we gaan gewoon.
00:01:01
Dus hier gaan we iets doen
00:01:04
Heel simpel dan.
00:01:06
Heel goed.
00:01:08
Tock
00:01:08
Dus we gaan gewoon een
00:01:11
meting die mijn code wordt genoemd.
00:01:14
Zal ik het je laten zien?
00:01:15
Dit is de mogelijkheid om terug te keren naar
00:01:17
De zin die ik je ook vertelde
00:01:18
om variabelen te kunnen maken.
00:01:20
Dus terug naar de lijn,
00:01:21
Wat ga ik doen?
00:01:22
Nou, ik ga alt onderhouden
00:01:23
op mijn toetsenbord en ga klikken
00:01:25
bij binnenkomst die me toestaat
00:01:26
hier om te doen wat je hebt gezien,
00:01:28
een regeleinde.
00:01:29
Ik heb de mogelijkheid om te creëren
00:01:31
variabelen dus onthouden
00:01:32
in Power Curry,
00:01:32
er waren ook variabelen gemaakt,
00:01:34
We zien dat de term verschijnt
00:01:36
in blauw dus teken dat,
00:01:37
Welnu, er is een interactie die
00:01:40
gemaakt met de Dax taal en we gaan.
00:01:43
Creëer bijvoorbeeld een waarde.
00:01:45
Zo zien we dat de naam van de
00:01:48
variabele verschijnt in groen,
00:01:50
We plaatsen bijvoorbeeld de waarde 3.
00:01:53
We gaan weer terug naar de lijn,
00:01:55
Creëer nieuwe waarde.
00:01:59
Dan 2 wat gelijk is aan 2.
00:02:03
En tot slot aangeven wat we willen
00:02:05
om in relatie daarmee als waarde terug te keren.
00:02:07
Dus bijvoorbeeld hier Var.
00:02:10
Totaal dat gelijk is aan waarde.
00:02:14
Hè?
00:02:14
Daarom
00:02:14
Zoals je hier nu ziet,
00:02:15
Hij biedt het me aan vermenigvuldigd met de waarde.
00:02:21
Van.
00:02:21
En tot slot de waarde aangeven
00:02:23
dat ik wil herstellen door
00:02:25
relatie tot alles wat berekent,
00:02:26
Dus we gaan het zoekwoord rendement gebruiken
00:02:30
en vraag hem om ons terug te sturen
00:02:31
Het totaal hier dus het lijkt erop
00:02:32
veel aan de kracht die ik je
00:02:34
had aan het einde voor alles laten zien
00:02:36
dat is het creëren van functies.
00:02:37
Waar we echt in staat zullen zijn
00:02:39
onze code uit te stralen, daar,
00:02:41
dwalen
00:02:41
en daarom mogelijk
00:02:42
veel gemakkelijker
00:02:43
om het te lezen als je er meer op terugkomt
00:02:45
Laat, we gaan hierheen maakte het idee, dat.
00:02:50
En om te kijken naar wat het geeft,
00:02:52
dus mijn code,
00:02:53
Waar plaatste hij zichzelf?
00:02:54
Nou, daar, gewoon in eerste positie.
00:02:57
En we zien dat, met grote verbazing,
00:02:59
Hij gaat me omdraaien.
00:03:00
De waarde 6 dus ik weet dat het een
00:03:03
Niet verwarrend om te gaan zetten
00:03:04
code in functies, maar het is
00:03:07
echt een advies dat ik je vertel
00:03:08
Geef wanneer je aan gaat staan
00:03:10
zeer complexe dingen,
00:03:11
complexere dingen of op zijn minst
00:03:13
Er wordt veel meer genest.
00:03:15
Zet meer stappen in uw
00:03:16
code omdat op een gegeven moment t het gaat
00:03:18
wees heel duidelijk voor je wanneer
00:03:19
je komt 15 dagen later terug,
00:03:20
U zult de functie beter begrijpen
00:03:22
die je gebruikt en het is zonde
00:03:23
omdat je potentieel
00:03:24
besteedde enkele tientallen minuten,
00:03:26
of zelfs enkele uren.
00:03:28
Een iets concreter voorbeeld voor
00:03:30
dat u kunt zien wat we kunnen
00:03:31
maak dit soort manipulatie,
00:03:33
het is om iets te gaan berekenen
00:03:35
Heel simpel,
00:03:36
Dus we gaan nu al de
00:03:39
gemiddelde deelname aan onze festivals,
00:03:41
Dus dit,
00:03:41
Dit hebben we al gezien met de functie
00:03:43
gemiddeld en daarna plezier hebben bij
00:03:45
bereken het aantal festivals dat
00:03:47
boven dit gemiddelde zitten.
00:03:50
Gewoon om een beetje van de la te zien,
00:03:52
Het verschil dat we zouden kunnen hebben met
00:03:53
de mediaan en het gemiddelde dat ik u vertelde,
00:03:55
er was een klein verschil,
00:03:56
Dus we gaan hierheen.
00:03:57
Bereken de. Aantal festivals
00:03:59
boven dit gemiddelde.
00:04:01
Dus we gaan creëren,
00:04:03
Zoals je je kunt voorstellen, een nieuwe maatregel.
00:04:07
Ik beloof het, het is de laatste.
00:04:10
Echt. Een nieuwe maatregel?
00:04:13
Waar we het nummer van
00:04:15
Bovengemiddelde festivals.
00:04:28
Daar ga je. En dus gaan we alt gebruiken.
00:04:31
Regeleinde.
00:04:33
We zullen een eerste variabele maken
00:04:36
die we gemiddeld zullen noemen.
00:04:38
Dat staat gelijk aan de functie om te woeden.
00:04:42
Festival 2018.
00:04:50
Hier en we zullen een 2e maken
00:04:53
lijn die Var gaat heten.
00:04:57
Boven?
00:05:01
Wie zal geroepen worden,
00:05:02
wie zal de berekeningsmethode gebruiken,
00:05:04
Dus wie staat hier toe, dan geloof ik
00:05:05
dat we die niet eens hadden gezien,
00:05:06
Het is dus de moeite waard.
00:05:07
Dus eigenlijk is het een functie die
00:05:08
hiermee kunt u meerdere activeren
00:05:09
opeenvolgende filters op een waarde.
00:05:11
Dus we gaan gewoon eetlust op.
00:05:13
Dus hij wat we willen is
00:05:15
Ga het aantal festivals berekenen
00:05:17
bovengemiddeld dus hier
00:05:19
zal het weer gaan halen.
00:05:20
Festival. 2018.
00:05:26
En dan gaan we het toepassen
00:05:27
Onze film dus namelijk festival
00:05:29
dat is bovengemiddeld.
00:05:39
Daarboven zetten we de Chevron
00:05:41
sluiten en we zullen ze het gemiddelde zoeken,
00:05:44
dus de functie die we hadden,
00:05:45
de variabele die we eerder hebben gemaakt.
00:05:48
Dat we zullen sluiten en we zullen een
00:05:50
Laatste stap die aangeeft om terug te keren.
00:05:58
Boven?
00:06:03
En zoals hier te zien is,
00:06:04
Het is een vrij eenvoudige methode, hè,
00:06:06
om te gaan filteren op dus deze
00:06:08
festivals die boven en dus
00:06:11
In Bereken ze, het aantal waarden.
00:06:14
En dus om onze code wat meer te gaan ventileren.
00:06:17
Zoals ik al eerder zei,
00:06:18
en dus ook om namen te zetten
00:06:19
expliciete variabelen, die,
00:06:20
die des te meer
00:06:22
de resulterende code te begrijpen.
00:06:29
We gaan hierheen. Voeg dit item toe.
00:06:33
We zullen het transformeren en zo hebben we
00:06:35
eindigt met die waarde.
00:06:37
Dus 1552 festivals.
00:06:40
Die zijn boven ons gemiddelde.
00:06:44
Dus daar gaan we.
00:06:46
met asfuncties,
00:06:47
Zoals ik al zei, hoe dan ook,
00:06:48
we zullen ze niet allemaal gezien hebben,
00:06:50
anders had het uren geduurd
00:06:51
en dat is niet het doel en hebben de
00:06:53
reflex om naar de documentatie te gaan
00:06:54
van Power BI om mogelijk te gaan
00:06:56
een beetje zoals Cory.
00:06:58
Als je een behoefte hebt om te gaan
00:06:59
zoek naar de juiste functie die
00:07:01
zal u in staat stellen om dit te doen,
00:07:02
er zijn er een paar toen ik je vertelde
00:07:04
enorm en ook om op de
00:07:05
Forums eh of plotseling, wereldwijd,
00:07:07
je zult altijd iemand hebben
00:07:08
goed advies om je te vertellen
00:07:10
welke functie moet worden gebruikt
00:07:12
afhankelijk van uw use case.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Parabéns, você chegou ao fim
00:00:02
de todas as funções do eixo I
00:00:04
Eu queria que você descobrisse.
00:00:06
Então, vimos alguns.
00:00:07
Você está muito bem equipado para
00:00:09
Crie suas primeiras funções em
00:00:11
Dax e, portanto, suas primeiras medições.
00:00:13
Vimos estatísticas de
00:00:15
katenação de texto,
00:00:16
extracção de informações,
00:00:17
colunas de busca de data
00:00:19
que estão relacionados através de
00:00:21
links para outras tabelas,
00:00:22
et cetera et cetera.
00:00:24
A única dificuldade que
00:00:25
você pode conhecer,
00:00:27
É quando você está em funções
00:00:29
que usará funções para
00:00:31
o interior de outras funções,
00:00:33
e assim por diante.
00:00:33
E pode rapidamente se tornar um pouco
00:00:35
Complicado ler o que vai fazer.
00:00:36
Uma expressão extremamente longa
00:00:38
com muitos parênteses.
00:00:39
Vimos alguns deles que foram
00:00:41
bastante complicado de ler.
00:00:42
E assim, aqui,
00:00:43
Eu queria dar-lhe um ou 2
00:00:44
Dicas para você ser
00:00:46
um pouco mais confortável e especialmente
00:00:48
escreva sua fórmula potencialmente
00:00:50
em várias linhas para ter um
00:00:52
Jogue um pouco mais fluido.
00:00:53
Então, para isso, vamos criar
00:00:55
uma nova medida prometida,
00:00:56
Esta é a penúltima vez que eu digo
00:00:59
esta frase. É isso, e nós estamos apenas indo.
00:01:01
Então, aqui vamos fazer algo
00:01:04
Coisa muito simples, então.
00:01:06
Muito bem.
00:01:08
Tac
00:01:08
Então, vamos apenas criar um
00:01:11
medida que será chamada de meu código.
00:01:14
Vou te mostrar?
00:01:15
Esta é a possibilidade de voltar a
00:01:17
A linha que eu estava lhe dizendo também
00:01:18
para poder criar variáveis.
00:01:20
Então, voltando à linha,
00:01:21
O que eu vou fazer?
00:01:22
Bem, eu vou manter alt
00:01:23
no meu teclado e vá clicar em
00:01:25
na entrada que me permitirá
00:01:26
aqui para fazer o que você viu,
00:01:28
uma quebra de linha.
00:01:29
Tenho a possibilidade de criar
00:01:31
variáveis para lembrar
00:01:32
em Power Curry,
00:01:32
variáveis também foram criadas,
00:01:34
Vemos que o termo aparece
00:01:36
em azul, portanto, sinal de que,
00:01:37
Bem, há uma interação que é
00:01:40
feito com a língua Dax e nós vamos.
00:01:43
Por exemplo, crie um valor.
00:01:45
Assim, vemos que o nome do
00:01:48
variável aparece em verde,
00:01:50
Vamos colocar, por exemplo, o valor 3.
00:01:53
Voltaremos à linha novamente,
00:01:55
Crie um novo valor.
00:01:59
Em seguida, 2 que será igual a 2.
00:02:03
E, finalmente, indique o que queremos
00:02:05
para retornar como valor em relação a isso.
00:02:07
Então, por exemplo, aqui Var.
00:02:10
Total que será igual ao valor.
00:02:14
Hem?
00:02:14
Portanto
00:02:14
Como você vê aqui agora,
00:02:15
Ele me oferece multiplicado pelo valor.
00:02:21
De.
00:02:21
E, finalmente, indique o valor
00:02:23
que eu quero recuperar por
00:02:25
relação com tudo o que calcula,
00:02:26
Então, vamos usar a palavra-chave return
00:02:30
e peça-lhe que nos devolva
00:02:31
O total aqui para que pareça
00:02:32
muito ao poder que eu te
00:02:34
tinha mostrado no final para tudo
00:02:36
que está criando funções.
00:02:37
Onde realmente seremos capazes
00:02:39
espaçar o nosso código, lá,
00:02:41
vagar
00:02:41
e, portanto, potencialmente têm
00:02:42
muito mais fácil
00:02:43
para lê-lo quando você voltar a ele mais
00:02:45
Tarde, vamos aqui fazer a ideia, essa.
00:02:50
E olhando para o que ela dá,
00:02:52
então meu código,
00:02:53
Onde ele se colocou?
00:02:54
Bem, lá, simplesmente na primeira posição.
00:02:57
E vemos que, com grande espanto,
00:02:59
Ele vai me virar.
00:03:00
O valor 6 então eu sei que é um
00:03:03
Não é confuso ir e colocar
00:03:04
código em funções, mas é
00:03:07
realmente um conselho que eu te digo
00:03:08
Dê quando você vai estar ligado
00:03:10
coisas muito complexas,
00:03:11
coisas mais complexas ou pelo menos
00:03:13
Há muito mais nidificação.
00:03:15
Coloque mais etapas no seu
00:03:16
código desde que em um momento t ele vai
00:03:18
seja muito claro para você quando
00:03:19
você voltará 15 dias depois,
00:03:20
Você vai entender mais a função
00:03:22
que você usa e é uma pena
00:03:23
porque você potencialmente tem
00:03:24
passou várias dezenas de minutos,
00:03:26
ou mesmo várias horas.
00:03:28
Um exemplo um pouco mais concreto para
00:03:30
que você pode ver o que podemos
00:03:31
fazer este tipo de manipulação,
00:03:33
é ir e calcular algo
00:03:35
Muito simples,
00:03:36
Então já vamos calcular o
00:03:39
participação média em nossos festivais,
00:03:41
Então, isso,
00:03:41
Já vimos isso com a função
00:03:43
média e depois de ir se divertir em
00:03:45
calcular o número de festivais que
00:03:47
estão acima dessa média.
00:03:50
Só para ver um pouco do la,
00:03:52
A diferença que poderíamos ter com
00:03:53
a mediana e a média que eu estava lhe dizendo,
00:03:55
havia uma pequena diferença,
00:03:56
Então nós vamos aqui.
00:03:57
Calcule o. Número de festivais
00:03:59
acima dessa média.
00:04:01
Então nós vamos criar,
00:04:03
Como você pode imaginar, uma nova medida.
00:04:07
Eu prometo, é a última.
00:04:10
De verdade. Uma nova medida?
00:04:13
Onde vamos chamá-lo de número de
00:04:15
Festivais acima da média.
00:04:28
Aí está. E então vamos usar alt.
00:04:31
Quebra de linha.
00:04:33
Criaremos uma primeira variável
00:04:36
que chamaremos de média.
00:04:38
O que é igual à função de raiva.
00:04:42
Festival 2018.
00:04:50
Aqui e vamos criar um 2º
00:04:53
linha que será chamada Var.
00:04:57
Acima?
00:05:01
Quem será chamado,
00:05:02
que utilizará o método de cálculo,
00:05:04
Então, quem permite aqui, então eu acredito
00:05:05
que nem sequer tínhamos visto aquele,
00:05:06
Então vale a pena.
00:05:07
Então, basicamente, é uma função que
00:05:08
permitirá que você ative vários
00:05:09
filtros sucessivos em um valor.
00:05:11
Então nós apenas aumentamos o apetite
00:05:13
Então ele o que queremos é
00:05:15
Vá e calcule o número de festivais
00:05:17
acima da média, então aqui nós
00:05:19
vai buscá-lo novamente.
00:05:20
Festival. 2018.
00:05:26
E então vamos aplicá-lo
00:05:27
O nosso festival de cinema
00:05:29
o que está acima da média.
00:05:39
Acima então lá vamos colocar a Chevron
00:05:41
fechando e vamos procurá-los a média,
00:05:44
então a função que tínhamos,
00:05:45
a variável que criamos antes.
00:05:48
Que vamos fechar e vamos usar um
00:05:50
Último passo que indicará para retornar.
00:05:58
Acima?
00:06:03
E como visto aqui,
00:06:04
É um método bem simples, hein,
00:06:06
para ir para filtrar em para que estes
00:06:08
festivais que estão acima e, portanto,
00:06:11
Em Calculá-los, o número de valores.
00:06:14
E assim ir e ventilar o nosso código um pouco mais.
00:06:17
Como eu disse antes,
00:06:18
e, portanto, também para colocar nomes
00:06:19
variáveis explícitas, que,
00:06:20
o que tornará ainda mais
00:06:22
compreensível o código resultante.
00:06:29
Nós vamos aqui. Adicione este item.
00:06:33
Vamos transformá-lo e por isso
00:06:35
acaba com esse valor.
00:06:37
Então, 1552 festivais.
00:06:40
Que estão acima da nossa média.
00:06:44
Então vamos lá.
00:06:46
com funções de eixo,
00:06:47
Como eu disse, enfim,
00:06:48
não os teremos visto todos,
00:06:50
caso contrário, teria levado horas
00:06:51
e esse não é o objetivo e ter o
00:06:53
reflex para ir para a documentação
00:06:54
do Power BI para potencialmente ir
00:06:56
um pouco como Cory.
00:06:58
Se você tem necessidade de ir
00:06:59
procure a função certa que
00:07:01
permitirá que você faça isso,
00:07:02
há alguns quando eu lhe disse
00:07:04
enormemente e também para ir no
00:07:05
Fóruns eh ou de repente, globalmente,
00:07:07
você sempre terá alguém
00:07:08
bom conselho para lhe dizer
00:07:10
qual função deve ser usada
00:07:12
dependendo do seu caso de uso.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Gratulacje, dotarłeś do końca
00:00:02
wszystkich funkcji osi I
00:00:04
Chciałem, żebyś odkrył.
00:00:06
Widzieliśmy ich całkiem sporo.
00:00:07
Jesteś bardzo dobrze przygotowany do
00:00:09
Utwórz swoje pierwsze funkcje w
00:00:11
Dax, a tym samym pierwsze pomiary.
00:00:13
Widzieliśmy statystyki z
00:00:15
katenacja tekstu,
00:00:16
ekstrakcja informacji,
00:00:17
Kolumny pobierania dat
00:00:19
którzy są powiązani poprzez
00:00:21
linki do innych tabel,
00:00:22
et cetera et cetera.
00:00:24
Jedyna trudność, że
00:00:25
możesz spotkać,
00:00:27
Dzieje się tak, gdy jesteś na funkcjach
00:00:29
, które będą używać funkcji do
00:00:31
wnętrze innych funkcji,
00:00:33
i tak dalej.
00:00:33
I szybko może się trochę stać
00:00:35
Skomplikowane czytać, co to zrobi.
00:00:36
Niezwykle długa ekspresja
00:00:38
z wieloma nawiasami.
00:00:39
Widzieliśmy niektóre z nich, które były
00:00:41
dość skomplikowane do odczytania.
00:00:42
I tak tutaj,
00:00:43
Chciałem dać ci jeden lub 2
00:00:44
Wskazówki, jak być
00:00:46
trochę wygodniej, a zwłaszcza
00:00:48
Potencjalnie napisz formułę
00:00:50
na kilku liniach, aby mieć
00:00:52
Graj trochę bardziej płynnie.
00:00:53
W tym celu stworzymy
00:00:55
nowy obiecany środek,
00:00:56
Mówię to po raz przedostatni
00:00:59
to zdanie. To wszystko, a my po prostu jedziemy.
00:01:01
Więc tutaj coś zrobimy
00:01:04
Bardzo prosta sprawa.
00:01:06
Bardzo dobrze.
00:01:08
Tock
00:01:08
Więc po prostu stworzymy
00:01:11
Miara, która będzie nazywana moim kodem.
00:01:14
Czy ci pokażę?
00:01:15
Jest to możliwość powrotu do
00:01:17
Linia, którą ci też mówiłem
00:01:18
, aby móc tworzyć zmienne.
00:01:20
Wracając do linii,
00:01:21
Co zamierzam zrobić?
00:01:22
Cóż, zamierzam utrzymać alt
00:01:23
na klawiaturze i kliknij ikonę
00:01:25
na wejściu, które mi pozwoli
00:01:26
Tutaj, aby uczynić to, co widziałeś,
00:01:28
podział wiersza.
00:01:29
Mam możliwość tworzenia
00:01:31
zmienne, więc pamiętaj
00:01:32
w Power Curry,
00:01:32
Utworzono również zmienne,
00:01:34
Widzimy, że termin się pojawia
00:01:36
W związku z tym na niebiesko należy zaznaczyć, że:
00:01:37
Cóż, istnieje interakcja, która jest
00:01:40
wykonane w języku Dax i gotowe.
00:01:43
Na przykład utwórz wartość.
00:01:45
Widzimy więc, że nazwa
00:01:48
zmienna pojawia się na zielono,
00:01:50
Umieścimy na przykład wartość 3.
00:01:53
Wrócimy do linii,
00:01:55
Utwórz nową wartość.
00:01:59
Następnie 2, które będą równe 2.
00:02:03
I na koniec wskaż, czego chcemy
00:02:05
zwrócić jako wartość w odniesieniu do tego.
00:02:07
Na przykład tutaj Var.
00:02:10
Suma, która będzie równa wartości.
00:02:14
Prawda?
00:02:14
Więc
00:02:14
Jak widzicie tu teraz,
00:02:15
On mi ją oferuje pomnożoną przez wartość.
00:02:21
Z.
00:02:21
I na koniec wskaż wartość
00:02:23
które chcę odzyskać przez
00:02:25
stosunek do wszystkiego, co kalkuluje,
00:02:26
Użyjemy więc słowa kluczowego return
00:02:30
i proś Go, aby nas zwrócił
00:02:31
Suma tutaj tak wygląda
00:02:32
wiele do mocy, którą ja ty
00:02:34
pokazał się na końcu za wszystko
00:02:36
czyli tworzenie funkcji.
00:02:37
Gdzie naprawdę będziemy w stanie
00:02:39
Umieść nasz kod, tam,
00:02:41
wędrować
00:02:41
i dlatego potencjalnie mają
00:02:42
o wiele łatwiej
00:02:43
przeczytaj go, gdy wrócisz do niego więcej
00:02:45
Późno, pojedziemy tutaj, wpadliśmy na pomysł, że.
00:02:50
I patrzeć na to, co daje,
00:02:52
więc mój kod,
00:02:53
Gdzie się umieścił?
00:02:54
Cóż, tam, po prostu na pierwszej pozycji.
00:02:57
I widzimy, że z wielkim zdumieniem,
00:02:59
On mnie odwróci.
00:03:00
Wartość 6 więc wiem, że to
00:03:03
Nie mylące, aby iść i umieścić
00:03:04
kod w funkcjach, ale jest
00:03:07
naprawdę rada, którą ci mówię
00:03:08
Dawaj kiedy będziesz włączony
00:03:10
bardzo skomplikowane rzeczy,
00:03:11
bardziej złożone rzeczy lub przynajmniej
00:03:13
Jest o wiele więcej zagnieżdżeń.
00:03:15
Umieść więcej kroków w swoim
00:03:16
kod od chwili t to idzie
00:03:18
Bądź dla ciebie bardzo jasny, kiedy
00:03:19
wrócisz 15 dni później,
00:03:20
Zrozumiesz funkcję bardziej
00:03:22
że używasz i szkoda
00:03:23
ponieważ potencjalnie masz
00:03:24
spędził kilkadziesiąt minut,
00:03:26
lub nawet kilka godzin.
00:03:28
Nieco bardziej konkretny przykład
00:03:30
że możesz zobaczyć, co my możemy
00:03:31
dokonać tego rodzaju manipulacji,
00:03:33
To iść i coś obliczyć
00:03:35
Całkiem proste,
00:03:36
Więc już teraz obliczymy
00:03:39
średnia frekwencja w naszych festiwalach,
00:03:41
Więc to,
00:03:41
Widzieliśmy to już w przypadku funkcji
00:03:43
przeciętny i po wyjeździe baw się dobrze
00:03:45
Oblicz liczbę festiwali, które
00:03:47
są powyżej tej średniej.
00:03:50
Tylko po to, aby zobaczyć trochę la,
00:03:52
Różnica, jaką możemy mieć z
00:03:53
mediana i średnia, którą ci mówiłem,
00:03:55
była niewielka różnica,
00:03:56
Więc pójdziemy tutaj.
00:03:57
Oblicz. Liczba festiwali
00:03:59
powyżej tej średniej.
00:04:01
Więc zamierzamy stworzyć,
00:04:03
Jak możesz sobie wyobrazić, nowy środek.
00:04:07
Obiecuję, że to ostatnie.
00:04:10
Naprawdę. Nowy środek?
00:04:13
Gdzie nazwiemy to numerem
00:04:15
Ponadprzeciętne festiwale.
00:04:28
Proszę bardzo. Użyjemy alt.
00:04:31
Podział wiersza.
00:04:33
Utworzymy pierwszą zmienną
00:04:36
które nazwiemy średnią.
00:04:38
Co jest równe funkcji wściekłości.
00:04:42
Festiwal 2018.
00:04:50
Tutaj i stworzymy 2.
00:04:53
linia, która będzie się nazywać Var.
00:04:57
Ponad?
00:05:01
Kto będzie powołany,
00:05:02
kto będzie korzystał z metody obliczeniowej,
00:05:04
Więc kto tu pozwala, to ja wierzę
00:05:05
że nawet nie widzieliśmy tego,
00:05:06
Więc warto.
00:05:07
Zasadniczo jest to funkcja, która
00:05:08
pozwoli Ci aktywować kilka
00:05:09
kolejne filtry na wartości.
00:05:11
Więc po prostu zwiększamy apetyt
00:05:13
Więc to, czego chcemy, to
00:05:15
Idź i oblicz liczbę festiwali
00:05:17
powyżej średniej, więc tutaj mamy
00:05:19
pójdzie po to ponownie.
00:05:20
Festiwal. 2018.
00:05:26
A potem go zastosujemy
00:05:27
Nasz film więc festiwal
00:05:29
co jest powyżej średniej.
00:05:39
Powyżej, więc tam umieścimy Chevron
00:05:41
zamknięcie i będziemy szukać ich średniej,
00:05:44
więc funkcja, którą mieliśmy,
00:05:45
zmienna, którą utworzyliśmy wcześniej.
00:05:48
Że zamkniemy i użyjemy
00:05:50
Ostatni krok, który wskaże powrót.
00:05:58
Ponad?
00:06:03
I jak widać tutaj,
00:06:04
To dość prosta metoda, huh,
00:06:06
aby przejść do filtrowania na tak te
00:06:08
festiwale, które są ponad i dlatego
00:06:11
W polu Oblicz je liczba wartości.
00:06:14
A więc, aby przejść i przewietrzyć nasz kod trochę bardziej.
00:06:17
Jak powiedziałem wcześniej,
00:06:18
a zatem także do umieszczania nazw
00:06:19
zmienne jawne, które,
00:06:20
co sprawi, że tym bardziej
00:06:22
zrozumiały wynikowy kod.
00:06:29
Jedziemy tutaj. Dodaj ten element.
00:06:33
Przekształcimy go i w ten sposób
00:06:35
kończy się tą wartością.
00:06:37
Czyli 1552 festiwale.
00:06:40
Które są powyżej naszej średniej.
00:06:44
No to zaczynamy.
00:06:46
z funkcjami osi,
00:06:47
Jak powiedziałem, w każdym razie,
00:06:48
nie zobaczymy ich wszystkich,
00:06:50
w przeciwnym razie zajęłoby to wiele godzin
00:06:51
A to nie jest celem i mieć
00:06:53
odruch, aby przejść do dokumentacji
00:06:54
usługi Power BI do potencjalnie przejść
00:06:56
trochę jak Cory.
00:06:58
Jeśli masz potrzebę wyjazdu
00:06:59
Poszukaj odpowiedniej funkcji, która
00:07:01
pozwoli Ci to zrobić,
00:07:02
są takie, kiedy wam powiedziałem
00:07:04
ogromnie, a także iść na
00:07:05
Fora eh lub nagle, globalnie,
00:07:07
zawsze będziesz miał kogoś
00:07:08
Dobra rada, aby ci powiedzieć
00:07:10
która funkcja ma być użyta
00:07:12
w zależności od przypadku użycia.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
बधाई हो, आप अंत तक पहुंच गए हैं
00:00:02
सभी अक्ष कार्यों में से I
00:00:04
मैं चाहता था कि आप खोजें।
00:00:06
इसलिए हमने काफी कुछ देखा है।
00:00:07
आप इसके लिए बहुत अच्छी तरह से सुसज्जित हैं
00:00:09
अपना पहला फ़ंक्शंस बनायें
00:00:11
डैक्स और इसलिए आपका पहला माप।
00:00:13
हमने आंकड़े देखे हैं
00:00:15
पाठ पाठ,
00:00:16
सूचना निष्कर्षण,
00:00:17
दिनांक लायेँ स्तंभ
00:00:19
जो किसके माध्यम से संबंधित हैं
00:00:21
अन्य तालिकाओं के लिए लिंक,
00:00:22
और वगैरह और वगैरह।
00:00:24
एकमात्र कठिनाई यह है कि
00:00:25
आप मिल सकते हैं,
00:00:27
यह तब होता है जब आप कार्यों पर होते हैं
00:00:29
जो कार्यों का उपयोग करेगा
00:00:31
अन्य कार्यों का इंटीरियर,
00:00:33
और आगे भी।
00:00:33
और यह जल्दी से थोड़ा सा बन सकता है
00:00:35
यह पढ़ने के लिए जटिल है कि यह क्या करने जा रहा है।
00:00:36
एक बहुत लंबी अभिव्यक्ति
00:00:38
कई कोष्ठक के साथ।
00:00:39
हमने उनमें से कुछ को देखा जो थे
00:00:41
पढ़ने के लिए काफी जटिल।
00:00:42
और इसलिए यहाँ,
00:00:43
मैं आपको एक या दो देना चाहता था।
00:00:44
आपके होने के लिए युक्तियाँ
00:00:46
थोड़ा अधिक आरामदायक और विशेष रूप से
00:00:48
संभावित रूप से अपना सूत्र लिखें
00:00:50
कई लाइनों पर एक होना चाहिए
00:00:52
थोड़ा और तरल पदार्थ खेलें।
00:00:53
तो इसके लिए हम बनाने जा रहे हैं
00:00:55
एक नया वादा किया गया उपाय,
00:00:56
यह आखिरी बार है जब मैं कहता हूं
00:00:59
यह वाक्य। यही है, और हम बस जा रहे हैं।
00:01:01
तो यहां हम कुछ करेंगे
00:01:04
तब बहुत ही सरल बात है।
00:01:06
बहुत ख़ूब।
00:01:08
Tock
00:01:08
तो हम सिर्फ एक बनाने जा रहे हैं
00:01:11
माप जिसे मेरा कोड कहा जाएगा।
00:01:14
क्या मैं आपको दिखाऊंगा?
00:01:15
यह वापसी की संभावना है
00:01:17
वह लाइन जो मैं आपको भी बता रहा था
00:01:18
चर बनाने में सक्षम होना।
00:01:20
तो लाइन पर वापस जाओ,
00:01:21
मै क्या करने जा रहा हूँ?
00:01:22
खैर, मैं इसे बनाए रखने जा रहा हूं
00:01:23
मेरे कीबोर्ड पर और क्लिक करें
00:01:25
प्रवेश पर जो मुझे अनुमति देगा
00:01:26
जैसा आपने देखा है वैसा करने के लिए,
00:01:28
एक लाइन ब्रेक।
00:01:29
मेरे पास बनाने की संभावना है
00:01:31
चर इसलिए याद रखें
00:01:32
पावर करी में,
00:01:32
चर भी बनाए गए थे,
00:01:34
हम देखते हैं कि यह शब्द प्रकट होता है
00:01:36
नीले रंग में इसलिए संकेत दें कि,
00:01:37
खैर एक बातचीत है जो है
00:01:40
डैक्स भाषा के साथ बनाया गया और हम जाते हैं।
00:01:43
उदाहरण के लिए, कोई मान बनाएँ।
00:01:45
तो हम देखते हैं कि इसका नाम क्या है?
00:01:48
चर हरे रंग में दिखाई देता है,
00:01:50
हम उदाहरण के लिए मान 3 रखेंगे।
00:01:53
हम फिर से लाइन पर वापस जाएंगे,
00:01:55
नया मान बनाएँ.
00:01:59
फिर 2 जो बराबर होगा 2.
00:02:03
और अंत में इंगित करें कि हम क्या चाहते हैं
00:02:05
इसके संबंध में मूल्य के रूप में लौटना।
00:02:07
उदाहरण के लिए यहाँ Var.
00:02:10
कुल यह मूल्य के बराबर होगा।
00:02:14
ना?
00:02:14
इसलिए
00:02:14
जैसा कि आप अब यहां देखते हैं,
00:02:15
वह इसे मुझे मूल्य से गुणा करता है।
00:02:21
से।
00:02:21
और अंत में मूल्य इंगित करें
00:02:23
जिसे मैं ठीक करना चाहता हूं
00:02:25
गणना करने वाली हर चीज के संबंध में,
00:02:26
तो हम कीवर्ड रिटर्न का उपयोग करने जा रहे हैं
00:02:30
और उसे हमें वापस करने के लिए कहें
00:02:31
यहां कुल मिलाकर ऐसा लगता है
00:02:32
उस शक्ति के लिए बहुत कुछ जो मैं तुम कर रहा हूँ
00:02:34
सब कुछ के लिए अंत में दिखाया था
00:02:36
जो कार्यों का निर्माण कर रहा है।
00:02:37
जहां हम वास्तव में सक्षम होंगे
00:02:39
हमारे कोड को वहां रखें,
00:02:41
घूमना
00:02:41
और इसलिए संभावित रूप से
00:02:42
बहुत आसान
00:02:43
जब आप इसे और अधिक वापस आते हैं तो इसे पढ़ें
00:02:45
देर से, हम यहां जाएंगे, यह विचार बनाया।
00:02:50
और यह देखने के लिए कि यह क्या देता है,
00:02:52
तो मेरा कोड,
00:02:53
उसने खुद को कहां रखा?
00:02:54
खैर, वहां, बस पहले स्थान पर।
00:02:57
और हम इसे बड़े आश्चर्य के साथ देखते हैं,
00:02:59
वह मुझे घुमाने जा रहा है।
00:03:00
मान 6 इसलिए मुझे पता है कि यह एक है
00:03:03
जाने और डालने के लिए भ्रमित नहीं है
00:03:04
कार्यों में कोड लेकिन यह है
00:03:07
वास्तव में सलाह का एक टुकड़ा जो मैं आपको बताता हूं
00:03:08
जब आप जा रहे हैं तो दें
00:03:10
बहुत जटिल बातें,
00:03:11
अधिक जटिल चीजें या कम से कम
00:03:13
घोंसले बहुत अधिक हैं।
00:03:15
अपने आप में और अधिक कदम रखें
00:03:16
कोड क्योंकि एक पल में यह चला जाता है
00:03:18
जब आप से बहुत स्पष्ट रहें
00:03:19
आप 15 दिन बाद वापस आएंगे,
00:03:20
आप फ़ंक्शन को अधिक समझेंगे
00:03:22
जिसका आप उपयोग करते हैं और यह शर्म की बात है
00:03:23
क्योंकि आपके पास संभावित रूप से है
00:03:24
कई दसियों मिनट बिताए,
00:03:26
या यहां तक कि कई घंटे भी।
00:03:28
के लिए थोड़ा और ठोस उदाहरण
00:03:30
कि आप देख सकते हैं कि हम क्या कर सकते हैं
00:03:31
इस प्रकार का हेरफेर करें,
00:03:33
यह जाकर कुछ गणना करना है
00:03:35
काफी सरल,
00:03:36
तो हम पहले से ही गणना करने जा रहे हैं
00:03:39
हमारे त्योहारों में औसत भागीदारी,
00:03:41
तो यह,
00:03:41
हम इसे पहले ही फ़ंक्शन के साथ देख चुके हैं
00:03:43
औसत और जाने के बाद मजा आता है
00:03:45
त्योहारों की संख्या की गणना करें
00:03:47
वे इस औसत से ऊपर हैं।
00:03:50
बस थोड़ा सा ला देखने के लिए,
00:03:52
अंतर जो हम कर सकते थे
00:03:53
माध्य और मतलबी मैं आपको बता रहा था,
00:03:55
एक छोटा सा अंतर था,
00:03:56
इसलिए हम यहां जा रहे हैं।
00:03:57
गणना करें। त्योहारों की संख्या
00:03:59
इस औसत से ऊपर।
00:04:01
तो हम बनाने जा रहे हैं,
00:04:03
जैसा कि आप कल्पना कर सकते हैं, एक नया उपाय।
00:04:07
मैं वादा करता हूं, यह आखिरी है।
00:04:10
सच में। एक नया उपाय?
00:04:13
हम इसे किसका नंबर कहेंगे?
00:04:15
औसत त्योहारों से ऊपर।
00:04:28
तुम वहाँ जाओ। और इसलिए हम alt का उपयोग करने जा रहे हैं।
00:04:31
लाइन ब्रेक।
00:04:33
हम एक पहला चर बनाएंगे
00:04:36
जिसे हम औसत कहेंगे।
00:04:38
जो क्रोध करने के कार्य के बराबर है।
00:04:42
महोत्सव 2018।
00:04:50
यहां और हम एक दूसरा बनाएंगे
00:04:53
लाइन जिसे Var कहा जाएगा।
00:04:57
ऊपर?
00:05:01
किसे बुलाया जाएगा,
00:05:02
गणना विधि का उपयोग कौन करेगा,
00:05:04
तो, यहां कौन अनुमति देता है, फिर मुझे विश्वास है
00:05:05
कि हमने उसे देखा भी नहीं था,
00:05:06
तो यह इसके लायक है।
00:05:07
तो मूल रूप से यह एक फ़ंक्शन है कि
00:05:08
आपको कई सक्रिय करने की अनुमति देगा
00:05:09
मान पर क्रमिक फ़िल्टर.
00:05:11
तो हम बस भूख बढ़ाते हैं
00:05:13
तो वह जो हम चाहते हैं वह है
00:05:15
जाओ और त्योहारों की संख्या की गणना करो
00:05:17
औसत से ऊपर, यहाँ हम
00:05:19
इसे फिर से प्राप्त करेंगे।
00:05:20
त्यौहार। 2018.
00:05:26
और फिर हम इसे लागू करेंगे
00:05:27
हमारी फिल्म, तो फेस्टिवल
00:05:29
जो औसत से ऊपर हो ।
00:05:39
ऊपर तो हम शेवरॉन डालेंगे
00:05:41
समापन और हम उन्हें औसत की तलाश करेंगे,
00:05:44
तो हमारे पास जो कार्य था,
00:05:45
वह चर जिसे हमने पहले बनाया था।
00:05:48
कि हम बंद कर देंगे और हम इसका उपयोग करेंगे
00:05:50
अंतिम चरण जो वापसी का संकेत देगा।
00:05:58
ऊपर?
00:06:03
जैसा कि यहाँ देखा गया है,
00:06:04
यह एक बहुत ही सरल विधि है, हुह,
00:06:06
फ़िल्टर करने के लिए जाएं ताकि ये
00:06:08
त्यौहार जो ऊपर हैं और इसलिए
00:06:11
उनकी गणना करें, मूल्यों की संख्या।
00:06:14
और इसलिए जाओ और हमारे कोड को थोड़ा और हवादार करें।
00:06:17
जैसा कि मैंने पहले कहा,
00:06:18
और इसलिए नाम भी डालना
00:06:19
स्पष्ट चर, जो,
00:06:20
जो सब कुछ और अधिक बना देगा
00:06:22
परिणामी कोड को समझने योग्य।
00:06:29
हम यहाँ जा रहे हैं। यह आइटम जोड़ें.
00:06:33
हम इसे बदल देंगे और इसलिए हम
00:06:35
उस मूल्य के साथ समाप्त होता है।
00:06:37
अब तक 1552 त्योहार मनाए जाते हैं।
00:06:40
जो हमारे औसत से ऊपर हैं।
00:06:44
तो यहाँ हम चलते हैं।
00:06:46
अक्ष कार्यों के साथ,
00:06:47
जैसा कि मैंने कहा, वैसे भी,
00:06:48
हमने उन सभी को नहीं देखा होगा,
00:06:50
अन्यथा इसमें घंटों लग जाते
00:06:51
और यह लक्ष्य नहीं है और है
00:06:53
दस्तावेज़ीकरण पर जाने के लिए रिफ्लेक्स
00:06:54
संभावित रूप से जाने के लिए पावर बीआई
00:06:56
कोरी की तरह थोड़ा सा।
00:06:58
यदि आपको जाने की आवश्यकता है
00:06:59
सही फ़ंक्शन की तलाश करें जो
00:07:01
आपको ऐसा करने की अनुमति देगा,
00:07:02
कुछ ऐसे हैं जब मैंने आपको बताया
00:07:04
बहुत बढ़िया और साथ ही आगे बढ़ना
00:07:05
मंच ों या अचानक, विश्व स्तर पर,
00:07:07
आपके पास हमेशा कोई न कोई होगा
00:07:08
आपको बताने के लिए अच्छी सलाह
00:07:10
किस फ़ंक्शन का उपयोग किया जाना है
00:07:12
आपके उपयोग के मामले के आधार पर।

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Congratulazioni, sei arrivato alla fine
00:00:02
di tutte le funzioni dell'asse I
00:00:04
Volevo che tu scoprissi.
00:00:06
Quindi ne abbiamo visti parecchi.
00:00:07
Sei molto ben attrezzato per
00:00:09
Crea le tue prime funzioni in
00:00:11
Dax e quindi le tue prime misurazioni.
00:00:13
Abbiamo visto statistiche da
00:00:15
katenazione del testo,
00:00:16
estrazione di informazioni,
00:00:17
Colonne di recupero data
00:00:19
che sono collegati attraverso
00:00:21
collegamenti ad altre tabelle,
00:00:22
et cetera et cetera.
00:00:24
L'unica difficoltà che
00:00:25
potresti incontrare,
00:00:27
Questo è quando sei in funzione
00:00:29
che utilizzerà le funzioni per
00:00:31
l'interno di altre funzioni,
00:00:33
e così via.
00:00:33
E può diventare rapidamente un po 'un po '
00:00:35
Complicato leggere cosa farà.
00:00:36
Un'espressione estremamente lunga
00:00:38
con molte parentesi.
00:00:39
Abbiamo visto alcuni di loro che erano
00:00:41
abbastanza complicato da leggere.
00:00:42
E così qui,
00:00:43
Volevo darti uno o 2
00:00:44
Consigli per essere
00:00:46
un po 'più comodo e soprattutto
00:00:48
Scrivi potenzialmente la tua formula
00:00:50
su più linee per avere un
00:00:52
Gioca un po 'più fluido.
00:00:53
Quindi per questo creeremo
00:00:55
una nuova misura promessa,
00:00:56
Questa è la penultima volta che dico
00:00:59
questa frase. Questo è tutto, e stiamo andando.
00:01:01
Quindi qui faremo qualcosa
00:01:04
Cosa molto semplice quindi.
00:01:06
Molto bene.
00:01:08
Tac
00:01:08
Quindi creeremo solo un
00:01:11
misura che si chiamerà My Code.
00:01:14
Te lo mostrerò?
00:01:15
Questa è la possibilità di tornare a
00:01:17
La linea che ti dicevo anch'io
00:01:18
per essere in grado di creare variabili.
00:01:20
Quindi, tornando alla linea,
00:01:21
Che cosa devo fare?
00:01:22
Bene, ho intenzione di andare a mantenere alt
00:01:23
sulla tastiera e vai fai clic su
00:01:25
all'ingresso che mi permetterà
00:01:26
qui per fare come hai visto,
00:01:28
un'interruzione di riga.
00:01:29
Ho la possibilità di creare
00:01:31
variabili in modo da ricordare
00:01:32
in Power Curry,
00:01:32
erano state create anche variabili,
00:01:34
Vediamo che il termine appare
00:01:36
in blu quindi indicare che,
00:01:37
Beh, c'è un'interazione che è
00:01:40
fatto con il linguaggio Dax e andiamo.
00:01:43
Ad esempio, creare un valore.
00:01:45
Quindi vediamo che il nome del
00:01:48
la variabile appare in verde,
00:01:50
Posizioneremo ad esempio il valore 3.
00:01:53
Torneremo di nuovo alla linea,
00:01:55
Creare nuovo valore.
00:01:59
Quindi 2 che sarà uguale a 2.
00:02:03
E infine indicare ciò che vogliamo
00:02:05
da restituire come valore in relazione a quello.
00:02:07
Quindi ad esempio qui Var.
00:02:10
Totale che sarà uguale al valore.
00:02:14
Eh?
00:02:14
Pertanto
00:02:14
Come vedete qui ora,
00:02:15
Me lo offre moltiplicato per il valore.
00:02:21
Da.
00:02:21
E infine indicare il valore
00:02:23
che voglio recuperare da
00:02:25
relazione a tutto ciò che calcola,
00:02:26
Quindi useremo la parola chiave return
00:02:30
e chiedigli di restituirci
00:02:31
Il totale qui quindi sembra che
00:02:32
molto al potere che io tu
00:02:34
aveva mostrato alla fine per tutto
00:02:36
che sta creando funzioni.
00:02:37
Dove saremo davvero in grado
00:02:39
distanzia il nostro codice, lì,
00:02:41
vagabondare
00:02:41
e quindi potenzialmente avere
00:02:42
molto più facile
00:02:43
per leggerlo quando torni su di esso più
00:02:45
Tardi, andremo qui ha reso l'idea, quello.
00:02:50
E per guardare cosa dà,
00:02:52
Quindi il mio codice,
00:02:53
Dove si è collocato?
00:02:54
Bene, lì, semplicemente in prima posizione.
00:02:57
E vediamo che, con grande stupore,
00:02:59
Mi farà girare.
00:03:00
Il valore 6 quindi so che è un
00:03:03
Non confondere per andare a mettere
00:03:04
codice nelle funzioni ma è
00:03:07
davvero un consiglio che ti dico
00:03:08
Dai quando sarai su
00:03:10
cose molto complesse,
00:03:11
cose più complesse o almeno
00:03:13
C'è molta più nidificazione.
00:03:15
Metti più passaggi nel tuo
00:03:16
codice poiché in un momento t va
00:03:18
Sii molto chiaro con te quando
00:03:19
tornerai 15 giorni dopo,
00:03:20
Capirai di più la funzione
00:03:22
che usi ed è un peccato
00:03:23
perché potenzialmente hai
00:03:24
trascorso diverse decine di minuti,
00:03:26
o anche diverse ore.
00:03:28
Un esempio un po' più concreto per
00:03:30
che puoi vedere quello che possiamo noi
00:03:31
fare questo tipo di manipolazione,
00:03:33
è andare a calcolare qualcosa
00:03:35
Abbastanza semplice,
00:03:36
Quindi calcoleremo già il
00:03:39
partecipazione media ai nostri festival,
00:03:41
Quindi questo,
00:03:41
Lo abbiamo già visto con la funzione
00:03:43
media e dopo andare a divertirsi a
00:03:45
Calcola il numero di festival che
00:03:47
sono al di sopra di questa media.
00:03:50
Solo per vedere un po 'di la,
00:03:52
La differenza che potremmo avere con
00:03:53
la mediana e la media che ti dicevo,
00:03:55
c'era una piccola differenza,
00:03:56
Quindi andremo qui.
00:03:57
Calcola il. Numero di festival
00:03:59
al di sopra di questa media.
00:04:01
Quindi creeremo,
00:04:03
Come potete immaginare, una nuova misura.
00:04:07
Lo prometto, è l'ultimo.
00:04:10
Per davvero. Una nuova misura?
00:04:13
Dove lo chiameremo numero di
00:04:15
Festival sopra la media.
00:04:28
Ecco. E quindi useremo alt.
00:04:31
Interruzione di riga.
00:04:33
Creeremo una prima variabile
00:04:36
che chiameremo media.
00:04:38
Che è uguale alla funzione di rabbia.
00:04:42
Festival 2018.
00:04:50
Qui e creeremo un 2 °
00:04:53
linea che si chiamerà Var.
00:04:57
Sopra?
00:05:01
Chi sarà chiamato,
00:05:02
chi utilizzerà il metodo di calcolo,
00:05:04
Quindi, chi permette qui, allora credo
00:05:05
che non avevamo nemmeno visto quello,
00:05:06
Quindi ne vale la pena.
00:05:07
Quindi fondamentalmente è una funzione che
00:05:08
ti permetterà di attivarne diversi
00:05:09
filtri successivi su un valore.
00:05:11
Quindi ci limitiamo a stimolare l'appetito
00:05:13
Quindi lui quello che vogliamo è
00:05:15
Vai a calcolare il numero di festival
00:05:17
sopra la media quindi qui abbiamo
00:05:19
andrà a prenderlo di nuovo.
00:05:20
Festival. 2018.
00:05:26
E poi lo applicheremo
00:05:27
Il nostro film così vale a dire festival
00:05:29
che è al di sopra della media.
00:05:39
Sopra quindi ci metteremo il Chevron
00:05:41
chiudendo e cercheremo per loro la media,
00:05:44
quindi la funzione che avevamo,
00:05:45
la variabile che abbiamo creato prima.
00:05:48
Che chiuderemo e useremo un
00:05:50
Ultimo passaggio che indicherà di tornare.
00:05:58
Sopra?
00:06:03
E come si vede qui,
00:06:04
È un metodo piuttosto semplice, eh,
00:06:06
per andare a filtrare su così questi
00:06:08
festival che sono sopra e quindi
00:06:11
In Calcolali, il numero di valori.
00:06:14
E quindi andare a ventilare un po' di più il nostro codice.
00:06:17
Come ho detto prima,
00:06:18
e quindi anche di mettere i nomi
00:06:19
variabili esplicite, che,
00:06:20
che renderà ancora più
00:06:22
comprensibile il codice risultante.
00:06:29
Stiamo andando qui. Aggiungi questo elemento.
00:06:33
Lo trasformeremo e così
00:06:35
finisce con quel valore.
00:06:37
Quindi 1552 feste.
00:06:40
Che sono al di sopra della nostra media.
00:06:44
Quindi eccoci qui.
00:06:46
con funzioni degli assi,
00:06:47
Come ho detto, comunque,
00:06:48
non li avremo visti tutti,
00:06:50
altrimenti ci sarebbero volute ore
00:06:51
e questo non è l'obiettivo e avere il
00:06:53
reflex per andare alla documentazione
00:06:54
di Power BI per andare potenzialmente
00:06:56
un po' come Cory.
00:06:58
Se hai bisogno di andare
00:06:59
Cerca la funzione giusta che
00:07:01
ti permetterà di farlo,
00:07:02
ce ne sono alcuni quando te l'ho detto
00:07:04
enormemente e anche per andare sul
00:07:05
Forum eh o improvvisamente, globalmente,
00:07:07
avrai sempre qualcuno
00:07:08
Buoni consigli da dirti
00:07:10
Quale funzione deve essere utilizzata
00:07:12
a seconda del caso d'uso.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Selamat, Anda telah mencapai akhir
00:00:02
dari semua fungsi sumbu I
00:00:04
Saya ingin Anda menemukannya.
00:00:06
Jadi kami telah melihat beberapa.
00:00:07
Anda diperlengkapi dengan sangat baik untuk
00:00:09
Buat fungsi pertama Anda di
00:00:11
Dax dan karenanya pengukuran pertama Anda.
00:00:13
Kami telah melihat statistik dari
00:00:15
katenasi teks,
00:00:16
ekstraksi informasi,
00:00:17
kolom pengambilan tanggal
00:00:19
yang berhubungan melalui
00:00:21
tautan ke tabel lain,
00:00:22
et cetera et cetera.
00:00:24
Satu-satunya kesulitan yang
00:00:25
Anda mungkin bertemu,
00:00:27
Ini adalah saat Anda menjalankan fungsi
00:00:29
yang akan menggunakan fungsi untuk
00:00:31
interior fungsi lainnya,
00:00:33
dan lain sebagainya.
00:00:33
Dan itu bisa dengan cepat menjadi sedikit
00:00:35
Rumit untuk membaca apa yang akan dilakukannya.
00:00:36
Ekspresi yang sangat panjang
00:00:38
dengan banyak tanda kurung.
00:00:39
Kami melihat beberapa dari mereka yang
00:00:41
cukup rumit untuk dibaca.
00:00:42
Dan di sini,
00:00:43
Saya ingin memberi Anda satu atau 2
00:00:44
Kiat untuk Anda menjadi
00:00:46
sedikit lebih nyaman dan terutama
00:00:48
Tulis rumus Anda secara potensial
00:00:50
pada beberapa baris untuk memiliki
00:00:52
Mainkan sedikit lebih lancar.
00:00:53
Jadi untuk itu kita akan membuat
00:00:55
ukuran baru yang dijanjikan,
00:00:56
Ini adalah waktu kedua dari belakang saya katakan
00:00:59
kalimat ini. Itu saja, dan kami hanya akan pergi.
00:01:01
Jadi di sini kita akan melakukan sesuatu
00:01:04
Hal yang sangat sederhana saat itu.
00:01:06
Baiklah.
00:01:08
Tock
00:01:08
Jadi kita hanya akan membuat
00:01:11
ukuran yang akan disebut kode saya.
00:01:14
Akankah saya tunjukkan?
00:01:15
Ini adalah kemungkinan untuk kembali ke
00:01:17
Kalimat yang saya katakan juga
00:01:18
untuk dapat membuat variabel.
00:01:20
Jadi kembali ke garis,
00:01:21
Apa yang akan saya lakukan?
00:01:22
Yah, aku akan pergi mempertahankan alt
00:01:23
pada keyboard saya dan klik
00:01:25
pada entri yang akan memungkinkan saya
00:01:26
di sini untuk melakukan seperti yang telah Anda lihat,
00:01:28
jeda baris.
00:01:29
Saya memiliki kemungkinan untuk membuat
00:01:31
variabel jadi ingat
00:01:32
dalam Power Curry,
00:01:32
variabel juga telah dibuat,
00:01:34
Kami melihat bahwa istilah itu muncul
00:01:36
oleh karena itu dengan warna biru tanda bahwa,
00:01:37
Nah ada interaksi yang
00:01:40
dibuat dengan bahasa Dax dan kami pergi.
00:01:43
Misalnya, buat nilai.
00:01:45
Jadi kita melihat bahwa nama
00:01:48
variabel muncul dalam warna hijau,
00:01:50
Kami akan menempatkan misalnya nilai 3.
00:01:53
Kami akan kembali ke garis lagi,
00:01:55
Ciptakan nilai baru.
00:01:59
Kemudian 2 yang akan sama 2.
00:02:03
Dan akhirnya tunjukkan apa yang kita inginkan
00:02:05
untuk mengembalikan sebagai nilai dalam kaitannya dengan itu.
00:02:07
Jadi misalnya di sini Var.
00:02:10
Total yang akan sama dengan nilai.
00:02:14
Ya?
00:02:14
Jadi
00:02:14
Seperti yang Anda lihat di sini sekarang,
00:02:15
Dia menawarkannya kepada saya dikalikan dengan nilai.
00:02:21
Dari.
00:02:21
Dan akhirnya menunjukkan nilainya
00:02:23
bahwa saya ingin pulih dengan
00:02:25
hubungan dengan segala sesuatu yang menghitung,
00:02:26
Jadi kita akan menggunakan kata kunci return
00:02:30
dan meminta dia untuk mengembalikan kita
00:02:31
Total di sini jadi terlihat seperti
00:02:32
banyak kekuatan yang aku kamu
00:02:34
telah ditampilkan di akhir untuk semuanya
00:02:36
yang menciptakan fungsi.
00:02:37
Di mana kita akan benar-benar bisa
00:02:39
spasi di luar kode kami, di sana,
00:02:41
jalan-jalan
00:02:41
dan karenanya berpotensi memiliki
00:02:42
jauh lebih mudah
00:02:43
untuk membacanya ketika Anda kembali lagi ke sana
00:02:45
Terlambat, kita akan pergi ke sini membuat ide, itu.
00:02:50
Dan untuk melihat apa yang diberikannya,
00:02:52
Jadi kode saya,
00:02:53
Di mana dia menempatkan dirinya?
00:02:54
Nah, di sana, hanya di posisi pertama.
00:02:57
Dan kita melihat itu, dengan keheranan yang luar biasa,
00:02:59
Dia akan membalikkan saya.
00:03:00
Nilai 6 jadi saya tahu itu adalah
00:03:03
Tidak membingungkan untuk pergi dan menempatkan
00:03:04
kode dalam fungsi tetapi itu
00:03:07
benar-benar nasihat yang saya katakan kepada Anda
00:03:08
Berikan saat Anda akan berada di
00:03:10
hal-hal yang sangat kompleks,
00:03:11
hal-hal yang lebih kompleks atau setidaknya
00:03:13
Ada lebih banyak sarang.
00:03:15
Letakkan lebih banyak langkah di anda
00:03:16
kode karena pada saat t itu berjalan
00:03:18
menjadi sangat jelas bagi Anda ketika
00:03:19
Anda akan kembali 15 hari kemudian,
00:03:20
Anda akan lebih memahami fungsinya
00:03:22
yang Anda gunakan dan itu memalukan
00:03:23
karena Anda berpotensi memiliki
00:03:24
menghabiskan beberapa puluh menit,
00:03:26
atau bahkan beberapa jam.
00:03:28
Contoh yang sedikit lebih konkret untuk
00:03:30
bahwa Anda dapat melihat apa yang kami bisa
00:03:31
membuat jenis manipulasi ini,
00:03:33
itu untuk pergi dan menghitung sesuatu
00:03:35
Cukup sederhana,
00:03:36
Jadi kita sudah akan menghitung
00:03:39
partisipasi rata-rata dalam festival kami,
00:03:41
Jadi ini,
00:03:41
Kami telah melihat ini dengan fungsinya
00:03:43
rata-rata dan setelah pergi bersenang-senang di
00:03:45
menghitung jumlah festival yang
00:03:47
berada di atas rata-rata ini.
00:03:50
Hanya untuk melihat sedikit la,
00:03:52
Perbedaan yang bisa kita miliki dengan
00:03:53
median dan rata-rata yang saya katakan,
00:03:55
ada perbedaan kecil,
00:03:56
Jadi kita akan pergi ke sini.
00:03:57
Hitung. Jumlah festival
00:03:59
di atas rata-rata ini.
00:04:01
Jadi kita akan membuat,
00:04:03
Seperti yang dapat Anda bayangkan, ukuran baru.
00:04:07
Saya berjanji, ini yang terakhir.
00:04:10
Nyata. Ukuran baru?
00:04:13
Di mana kami akan menyebutnya nomor
00:04:15
Festival di atas rata-rata.
00:04:28
Dan itu dia. Jadi kita akan menggunakan alt.
00:04:31
Jeda baris.
00:04:33
Kami akan membuat variabel pertama
00:04:36
yang akan kita sebut rata-rata.
00:04:38
Yang sama dengan fungsi untuk mengamuk.
00:04:42
Festival 2018.
00:04:50
Di sini dan kita akan membuat yang ke-2
00:04:53
garis yang akan disebut Var.
00:04:57
Atas?
00:05:01
Siapa yang akan dipanggil,
00:05:02
siapa yang akan menggunakan metode perhitungan,
00:05:04
Jadi, siapa yang mengizinkan di sini, maka saya percaya
00:05:05
bahwa kami bahkan belum pernah melihat yang itu,
00:05:06
Jadi itu sepadan.
00:05:07
Jadi pada dasarnya itu adalah fungsi yang
00:05:08
akan memungkinkan Anda untuk mengaktifkan beberapa
00:05:09
filter berturut-turut pada nilai.
00:05:11
Jadi kita naik nafsu makan saja
00:05:13
Jadi dia yang kita inginkan adalah
00:05:15
Pergi dan hitung jumlah festival
00:05:17
di atas rata-rata jadi di sini kami
00:05:19
akan mendapatkannya lagi.
00:05:20
Festival. 2018.
00:05:26
Dan kemudian kami akan menerapkannya
00:05:27
Film kami jadi festival
00:05:29
yang di atas rata-rata.
00:05:39
Di atas jadi di sana kita akan meletakkan Chevron
00:05:41
menutup dan kami akan mencari mereka rata-rata,
00:05:44
Jadi fungsi yang kami miliki,
00:05:45
variabel yang kita buat sebelumnya.
00:05:48
Bahwa kami akan menutup dan kami akan menggunakan
00:05:50
Langkah terakhir yang akan menunjukkan untuk kembali.
00:05:58
Atas?
00:06:03
Dan seperti yang terlihat di sini,
00:06:04
Ini metode yang cukup sederhana, ya,
00:06:06
untuk pergi ke filter jadi ini
00:06:08
festival yang berada di atas dan karenanya
00:06:11
Dalam Hitung mereka, jumlah nilai.
00:06:14
Jadi untuk pergi dan ventilasi kode kita sedikit lebih banyak.
00:06:17
Seperti yang saya katakan sebelumnya,
00:06:18
dan karena itu juga untuk menempatkan nama
00:06:19
variabel eksplisit, yang,
00:06:20
yang akan membuat lebih banyak
00:06:22
dapat dimengerti kode yang dihasilkan.
00:06:29
Kami akan pergi ke sini. Tambahkan item ini.
00:06:33
Kami akan mengubahnya dan karenanya kami
00:06:35
berakhir dengan nilai itu.
00:06:37
Jadi 1552 festival.
00:06:40
Yang di atas rata-rata kami.
00:06:44
Jadi ini dia.
00:06:46
dengan fungsi sumbu,
00:06:47
Seperti yang saya katakan, bagaimanapun,
00:06:48
kita tidak akan melihat semuanya,
00:06:50
jika tidak, itu akan memakan waktu berjam-jam
00:06:51
dan itu bukan tujuan dan memiliki
00:06:53
refleks untuk pergi ke dokumentasi
00:06:54
Power BI berpotensi digunakan
00:06:56
sedikit seperti Cory.
00:06:58
Jika Anda memiliki kebutuhan untuk pergi
00:06:59
Cari fungsi yang tepat yang
00:07:01
akan memungkinkan Anda untuk melakukannya,
00:07:02
ada beberapa ketika saya memberi tahu Anda
00:07:04
sangat dan juga untuk melanjutkan
00:07:05
Forum eh atau tiba-tiba, secara global,
00:07:07
Anda akan selalu memiliki seseorang
00:07:08
Saran yang bagus untuk memberi tahu Anda
00:07:10
fungsi mana yang akan digunakan
00:07:12
tergantung pada kasus penggunaan Anda.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

00:00:00
Parabéns, você chegou até o fim
00:00:02
de todas as funções do eixo que I
00:00:04
Eu queria apresentá-lo a você.
00:00:06
Então, vimos bastantes.
00:00:07
Você está muito bem equipado para
00:00:09
Crie as suas primeiras funções em
00:00:11
Dax e, portanto, suas primeiras medições.
00:00:13
Vimos estatísticas de
00:00:15
katenação de texto,
00:00:16
extração de informação,
00:00:17
Colunas de busca de data
00:00:19
que estão ligados através de
00:00:21
ligações a outros quadros,
00:00:22
et cetera.
00:00:24
A única dificuldade que
00:00:25
você pode encontrar,
00:00:27
É quando você está em funções
00:00:29
que usará funções para
00:00:31
no âmbito de outras funções,
00:00:33
e assim por diante.
00:00:33
E pode rapidamente ficar um pouco
00:00:35
É difícil ler o que vai fazer.
00:00:36
Uma expressão extremamente longa
00:00:38
com muitos parênteses.
00:00:39
Vimos vários deles que foram
00:00:41
bastante complicado de ler.
00:00:42
E assim aqui,
00:00:43
Eu queria dar-lhe um ou 2
00:00:44
Dicas para você ser
00:00:46
um pouco mais confortável e especialmente
00:00:48
Escreva a sua fórmula potencialmente
00:00:50
em várias linhas para ter um
00:00:52
Reprodução um pouco mais suave.
00:00:53
Então, para isso, vamos criar
00:00:55
prometida uma nova medida,
00:00:56
Esta é a penúltima vez que digo
00:00:59
esta frase. É isso, e nós vamos lá.
00:01:01
Então agora vamos fazer alguma coisa
00:01:04
É muito simples, então.
00:01:06
Muito bem.
00:01:08
Tock
00:01:08
Então, vamos apenas criar um
00:01:11
Essa medida vai se chamar meu código.
00:01:14
Vou mostrar-lhe?
00:01:15
É a possibilidade de voltar a
00:01:17
A frase que eu estava dizendo também
00:01:18
para ser capaz de criar variáveis.
00:01:20
Então, para voltar à linha,
00:01:21
O que é que eu vou fazer?
00:01:22
Bem, eu vou segurar alt
00:01:23
No meu teclado e ir clique em
00:01:25
sobre os contributos que me permitirão
00:01:26
aqui para fazer como você viu,
00:01:28
uma quebra de linha.
00:01:29
Eu tenho a capacidade de criar
00:01:31
variáveis, então lembre-se
00:01:32
em Power Curry,
00:01:32
Também tivemos que criar variáveis,
00:01:34
Podemos ver que o termo aparece
00:01:36
em azul, portanto, um sinal de que,
00:01:37
Bem, há uma interação que é
00:01:40
feito com a linguagem Dax e nós vamos.
00:01:43
Por exemplo, crie valor um.
00:01:45
Assim, vemos que o nome do
00:01:48
variável aparece em verde,
00:01:50
Por exemplo, vamos defini-lo como 3.
00:01:53
Vamos voltar à linha novamente,
00:01:55
Crie novo valor.
00:01:59
Então 2 vai ser igual a 2.
00:02:03
E, finalmente, indique o que você quer
00:02:05
para retornar como um valor relativo a isso.
00:02:07
Então, por exemplo, aqui Var.
00:02:10
Total que vai ser igual ao valor.
00:02:14
Ué?
00:02:14
Por conseguinte,
00:02:14
Como você vê aqui agora,
00:02:15
Oferece-a multiplicada pelo valor.
00:02:21
De.
00:02:21
E, finalmente, indique o valor
00:02:23
que eu quero recuperar por
00:02:25
em relação a tudo o que calcula,
00:02:26
Então, vamos usar a palavra-chave return
00:02:30
e peça-lhe que volte para nós
00:02:31
O total aqui, então parece
00:02:32
muito ao poder que tenho diante de vós.
00:02:34
Tinha mostrado no final para tudo
00:02:36
que é criar funções.
00:02:37
Onde realmente seremos capazes de
00:02:39
espalhe o nosso código, lá,
00:02:41
vagar
00:02:41
e, por conseguinte, potencialmente têm
00:02:42
muito mais fácil
00:02:43
para lê-lo quando você voltar a ele mais
00:02:45
Mais tarde, vamos passar por aqui e fazer a ideia, isso.
00:02:50
E para ver o que acontece,
00:02:52
Então, meu código,
00:02:53
Onde ele se encaixou?
00:02:54
Bem, muito simplesmente, em primeiro lugar.
00:02:57
E vemos que, com grande espanto,
00:02:59
Ele vai me virar.
00:03:00
O valor 6, então eu sei que é um
00:03:03
não confundem ir e colocar novamente
00:03:04
código em funções, mas é
00:03:07
realmente um conselho que gostaria de lhe dar.
00:03:08
dá quando você vai estar em
00:03:10
coisas muito complexas,
00:03:11
coisas mais complexas ou, pelo menos,
00:03:13
Há muito mais nidificação.
00:03:15
Coloque mais passos no seu
00:03:16
código porque em um determinado momento está tudo bem
00:03:18
Seja muito claro para você quando
00:03:19
Você estará de volta 15 dias depois,
00:03:20
Você vai entender mais a função
00:03:22
que você usa e é uma pena
00:03:23
porque potencialmente tem
00:03:24
Após várias dezenas de minutos,
00:03:26
ou mesmo várias horas.
00:03:28
Um exemplo um pouco mais concreto para
00:03:30
que você pode ver o que podemos
00:03:31
para fazer este tipo de manipulação,
00:03:33
é ir e calcular alguma coisa
00:03:35
É muito simples,
00:03:36
Então nós já vamos calcular o
00:03:39
média de participação nos nossos festivais,
00:03:41
Então, isso,
00:03:41
Já vimos isso com o
00:03:43
média e depois vá se divertir em
00:03:45
Calcule o número de festivais que
00:03:47
estão acima desta média.
00:03:50
Só para ver um pouco do la,
00:03:52
a diferença que poderíamos ter com
00:03:53
a mediana e a média que eu lhe dizia,
00:03:55
Houve uma pequena diferença,
00:03:56
Então nós vamos passar por aqui.
00:03:57
Calcule o. Número de festivais
00:03:59
acima desta média.
00:04:01
Então nós vamos criar,
00:04:03
Como podem imaginar, uma nova medida.
00:04:07
Eu prometo, é a última.
00:04:10
A sério. Uma nova medida?
00:04:13
Onde vamos chamá-lo de número de
00:04:15
festivais acima da média.
00:04:28
Aqui tens. E assim vamos usar alt.
00:04:31
Fechando a linha.
00:04:33
Vamos criar uma primeira variável
00:04:36
que vamos chamar de média.
00:04:38
O que é igual à função de raiva.
00:04:42
Festival 2018.
00:04:50
Aqui e vamos criar uma 2ª
00:04:53
linha que se chamará Var.
00:04:57
Acima?
00:05:01
Quem vai ser chamado,
00:05:02
quem vai utilizar o método de cálculo,
00:05:04
Então, quem permite aqui, então eu acredito
00:05:05
que nem tínhamos visto aquele,
00:05:06
Então vale a pena.
00:05:07
Então, basicamente, é uma função que
00:05:08
habilitará vários
00:05:09
filtros sucessivos em um valor.
00:05:11
Então vamos ter apetite
00:05:13
Portanto, o que queremos é
00:05:15
Vá calcular o número de festivais
00:05:17
acima da média, então aqui nós
00:05:19
Vá buscá-lo novamente.
00:05:20
Festival. 2018.
00:05:26
E então vamos aplicá-lo
00:05:27
O nosso filme é, portanto, para conhecer festival
00:05:29
que está acima da média.
00:05:39
Além disso, vamos colocar a Chevron
00:05:41
fechando e vamos conseguir a média,
00:05:44
Então, a função que tínhamos,
00:05:45
a variável que criamos antes.
00:05:48
Vamos fechá-lo e vamos usar um
00:05:50
O último passo que indicará para retornar.
00:05:58
Acima?
00:06:03
E como visto aqui,
00:06:04
É um método bem simples, hein,
00:06:06
para ir para filtrar para que estes
00:06:08
festivais que estão acima e, portanto,
00:06:11
Em Calculá-los, o número de valores.
00:06:14
E assim ir e arejar o nosso código um pouco mais.
00:06:17
Como lhe disse antes,
00:06:18
e, portanto, colocar nomes também
00:06:19
variáveis explícitas, que,
00:06:20
o que tornará tudo ainda mais
00:06:22
compreensível o código resultante.
00:06:29
Nós vamos aqui. Adicione este item.
00:06:33
Nós vamos transformá-lo e assim vamos
00:06:35
acaba com esse valor.
00:06:37
Assim, 1552 festivais.
00:06:40
Que estão acima da nossa média.
00:06:44
Então, lá está, estamos acabados
00:06:46
com funções de eixo,
00:06:47
Como eu estava lhe dizendo, de qualquer maneira,
00:06:48
não os teremos visto todos,
00:06:50
caso contrário, teria demorado horas
00:06:51
E esse não é o objetivo e ter o
00:06:53
Reflexo para ir à documentação
00:06:54
do Power BI para potencialmente ir
00:06:56
um pouco como Cory.
00:06:58
Se você tem uma necessidade de ir
00:06:59
Procure a função certa que
00:07:01
permitir-lhe-á fazê-lo,
00:07:02
Há alguns quando eu lhe disse
00:07:04
e também para ir no
00:07:05
Fóruns, eh, ou como resultado, globalmente,
00:07:07
Você sempre terá alguém
00:07:08
Bom conselho para lhe dizer
00:07:10
Que função deve ser utilizada
00:07:12
dependendo do seu caso de uso.

Il n’existe aucun élément correspondant à votre recherche dans cette vidéo...
Effectuez une autre recherche ou retournez au contenu !

 

DiLeap AI: CE QUI POURRAIT VOUS INTÉRESSER

Rappel

Afficher