Congratulations Ruth. I've been lost trying understanding many other videos from you. And almost quitting this channel. But in this video especially you did a very good job. Following the steps: Show the problem -> Show what we want - > Show how it's done in excel (step-by-step) -> Show how to do over power BI (step-by-step). Very good.
@@CurbalEN . Yes. Exactly. I've been doing a course in DAX, since it has a path to follow along. But everytime i have a confusion in some function i come here to see your videos. However, lately, many of them i haven't been able to understand either. Why? I think you throw too fast the explanation of the functionality. I mean, you show how to do, but don't explain how it works. And is this background process that makes me get the real idea of the function. If you explain it more deeply in the process, and using excel to illustrate the steps, for example, so people can be bored, but they will understand, while others, like me will have the chance to understand that also. Everybody wins, just for some taking longer. And this is what happened in this video now. You went to excel and showed all the process. Therefore i understood, and loved it. But anyway thank you a lot for your explanations. When done like this last one, they are helping me a lot.
Ok, i understand. It is not so much about boring people, but about me finding the time to do the videos at that detail. I do understand your point though and see why it would be useful for beginners. I try in every video to explain what happens “behind” the scenes, but I do it with words rather than excel. Let me see what I can do, but due to time constrains I won’t be able to promise anything. Thanks a million for the detailed feedback! /Ruth
Oh My God ! This is fantastic.. Though it is a 7 years old video it helped me a lot. I am new to power bi, trying to get a job. Glad I came to know about your channel. Thanks again
It was really very useful. I had a lot of problems with the logic of this function, but you explained it very simply and fluently with an example. Great as always and thank you... By the way, the phrase earlier = current row It was very important in education.
Hey Ruth. Excellent Video. You made it sound real easy. Nevertheless, since this is very important function, I believe this requires a second version (after your return from vacations) where Earlier is explained in terms of inner and outer evaluation contexts and explained how two row contexts are interacting in the above example and if we do not use Earlier inner evaluation context will yield the answer (that for calculating accumulated balance will not be correct).
Excelente video Ruth! Justamente acababa de leer una parte del libro de Marcos Ruso y Alberto Ferrari sobre la función EARLIER pero no me quedó muy claro. Miré tu video y me quedó más que claro.
Muchas gracias Ruth!!! hace cada vez mas fácil mi avance en el análisis de datos!... realmente tiene muy buenos métodos para ilustrar de forma sencilla temas complejos... muy buen vídeo!!!
+Norberto Vera Reatiga Gracias Norberto! Poco a poco voy aprendiendo a hacer mejores vídeos y ha explicarme mejor :) Por cierto, me gusto mucho tu infografia: norbertoverareatiga.blogspot.se/2016/11/distribucion-de-la-prestacion-de.html?spref=tw&m=1 /Ruth
Thank you, this is very good... Instead of using the Measure of [tot sales], you can also use SUM(Ex1[Total sales]). And you might get different results than expected if you have two rows with the same date.
@@CurbalEN Just for "grins and giggles" I tried the EARLIER function out on a string column and it works alphabetically. I can't think of an immediate application for that... But I'm sure there is one.
Hello, thank you for the videos. One question: imagine that I already have ACC SALES column. Now I want to add a new Column without an Accumulation (just deltas between one date and the next one). Using REVERSED ACC SALES BY DATES formula it doesn't work. Can you help me ?
Hi Ruth, Thank you for the awesome explanation. Could you please explain what would be the difference if I use selectedvalue function in place of earlier function in this example? Could you please give an example so that we can differentiate the use of these two functions?
Hello, I appreciate the quality of your videos and commend you for the clarity of your explanations. I'm wondering if it's possible to apply the "Earlier" function in a DAX measure for calculating the cumulative total of revenue by product category, for instance.
excelente tus ejemplos porfavo sigue como mas MEDIDAS DAX como values , contains etc. gracias por tu aporte siempre lo explicas muy bien y sencillo gracias :)
Hi,Ruth.I created a calculated column using earlier function like, CALCULATE([total sales],FILTER('Table (2)',EARLIER('Table (2)'[numbers],2))).But,it shows error ,that is EARLIER/EARLIEST refers to an earlier row context which doesn't exist.What it means.
Even I faced the same issue, looking forward to a reply. Below is my DAX Expression : Cumm Salary = CALCULATE(SUM('Learn Earlier'[Salary]),FILTER('Learn Earlier',EARLIER(id)>='Learn Earlier'[Id])) It says - Parameter is not correct type for EARLIER(id)
Hi.. great work.. I am learning a lot from your videos.... I have a query .. what if, you dont have the date column.. how will you then give the condition ??
Thanks for kind reply.. Sorry, but i didn't get you .... can you please elaborate.. suppose i dont have date column, then what is the criteria shall i write...
Recuerda pedirle a la gente que desactive el adblock al principio del video y que recargue la pagina para que se cargue el anuncio! Que te lo has currao! No tengas vergüenza de pedirlo, que si a la gente le gustan tus videos te comprenderan y lo haran con gusto. Gracias.
I tried the same but for me its showing error. Reverse Account Sales = CALCULATE([Sales Amount],FILTER(DateC,DateC[Date]>=EARLIER(DateC[Date]))) EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
Hola Ruth, Estaba intentado usar Earlier en una medida (campo calculado). Y me sale un error diciendo que Earlier tiene un contexto de fila anterior que no existe. Sera que solo se puede usar Earlier en columna calculadas. La use dentro de SUMX .Muy agradecido
Hello Ruth, I love your videos. I've got some feedback to explain EARLIER better. It was really confusing at the beginning because sometimes you place Earlier first and smts at the end. EARLIER(Exc1[Date] >= Exc1[Date] . I'd rather always keep the field from the table first and then, value to compare. For instance, It's easier to read x > 0, y >= 2, z
Hola Gracias por la explicacion! Animo con ese trabajo DAX fridays es un idea genial! un poco mas de fluides en la explicacion ayudaria, Excelente trabajo!
Hi Ruth I try the same formula on your pbix file provided but i dont know what the reason whenever i tried the Earlier Function under the column name it didnt suggest anything Could you please let me know
Como siempre, excelente presentación y buena metodología para explicar. Ruth quisiera preguntarte algo, tienes alguna idea de la diferencia entre esta función y EARLIEST?. Buscando en Internet, más allá de la definición no veo ningún ejemplo que pueda clarificar la diferencia entre ambas. Gracias! :)
Thanks Ruth. DAX Fridays is a very good idea and your explanations are very clear for everybody (even for people without knowledge, like me).Congratulations
Hi Ruth, how are you? Great great video, but do you know how to do the cummulative in a matrix for example without dates or indexes? I mean, immagine you have first column with your products, like in this video and then you simply want to calculate cummulative amounts for each row... In your Excel example you have 3000, 200 and 2000 (row 1, 2 and 3). Using some trick I don't know, in the third row I want to return 5200 desregarding dates... Loking just to produtcs listed.
@@CurbalEN Sorry, I did not understand your reply. You mean you have showed here? I don't know If I explain correct... I want to do the cummulative considering just the products... Row 1 = Produt 1 with 3000; Row 2 = Product 2 with 200 and Row 3 = Product 3 with 2000. No dates in any dimension... So, I want to have a measure called for ex: Cummlative I will put besides Amount column and in the same row as product 3 I will have 5200.
Gracias Ruth!!, Oye eres muy buena compartiendo conocimiento. Tengo una duda, y he pasado todo el dia dando vueltas en el asunto, siempre veo que el EARLIER lo usan con Fecha, es posible acumular sin tener la fecha, por ejemplo, acumular por producto. Gracias, tus videos son una gran ayuda.
Muchas gracias Ruth, le cuento que pude hacerlo. 1drv.ms/u/s!Av45wU--PqgJwh52sFfmra-nqzp7 Le dejo el link a OneDrive para que vea lo que queria hacer. Muchas gracias por todo.
Gracias por el video. Una consulta, por favor. Si en el caso que yo no quisiera sumar, sino solo obtener tal cual el ultimo valor o el valor anterior, con que función podría hacerlo?. Espero haberme explicado bien. Gracias.
+Dey JT No es posible poner columnas sin ninguna función. Dependiendo de lo que quieras hacer puedes usar VALUES o MAX, MIN.. Espero que esto te ayude, /Ruth
Hi Ruth , thanks for this videos. Could you please explain why earlier is going to be evaluated against the whole date table. You did not write all[ date] so the way it is expressed earlier(Ex1,[date] >= Ex1 [date] it seems that it is evaluated with the current filter context. Why is it not Earlier(Ex1,[date]>= All(Ex1[Date] . Thanks
Hi Dave, I did that video 4 times and I didn’t manage to get it right the fourth either? You are correct on your assumption, sorry for the misunderstanding! /Ruth
Thanks for ur videos ..they are awesome!! If i write 2 formulas as - Column 2 = CALCULATE(SUM(Sheet1[price]),FILTER(Sheet1,Sheet1[date ]>=EARLIER(Sheet1[date ]))) or Column = CALCULATE(SUM(Sheet1[price]),FILTER(Sheet1,EARLIER(Sheet1[date ])
Hi Ruth. Very didatic explanation. I have a situation that got me stuck. How do I get a value from a previous day when the dates are non contiguous. ie. Monday i need a value from Friday. There are Blank values in Saturday and Sunday).? Best regards
CAUTION ON THIS EXPLANATION!!! One caution I would suggest with this explanation is that it may mistakenly give the viewer the impression that the EARLIER function has to do with *points in time*. This is not true. The example given---while valid---is only *coincidentally* evaluating two values based on whether one is “earlier” than the other. EARLIER could just as well be used in a comparison of dollars or text or Boolean or whatever. “Earlier” is not the comparison being made, *greater or equal to* is the comparison being made, and it only “relates” to the earlier-ness of the date in this example by mere coincidence. EARLIER() “returns the current value of the specified column in an outer evaluation pass of the mentioned column”. If I understand correctly, the “EARLIER” function results in a recursive evaluation of the table, and in this case will result in (essentially) TWO levels of table scans, the first (an outer or “earlier” scan context), and for each row in this outer scan, a second scan (an inner or “current” scan context). In each of the comparisons the outer (earlier) value will be compared to an inner (current) value. Best Regards.
Hi, Thanks for info shared. What if I have data which do not have dates & still I need to calculate ACC Sales, for Eg. If we need to do ABC Analysis, I need to identify ACC COGS, in that case how to use this function
M5:=RANKX(FILTER(FactIncidents,EARLIER(FactIncidents[ActionType])=FactIncidents[ActionType]),[M2],,ASC,Dense) I tried this above function in TOM Model but this is not working fine. Can anyone help to create rank without duplicate?
In the Excel worksheet that you were using, you wrote "EARLIER = Current Row" in a corner. Remembering that simple thing is so helpful in understanding EARLIER. Also worth checking this link javierguillen.wordpress.com/2012/02/06/can-earlier-be-used-in-dax-measures/ where the author shows how to create nested row context in a measure. Interesting!
Hi, I'm from Brazil and I'm following your channel, congratulations. How do I find the difference from one line to another by date? Can you help me? For example if each line had the km, how to calculate the difference? Thank you!!! Sorry for my poor English.
Olá Claudinei! Do you mean that you would like to calculate the difference between the rows, so: row 1- 12km row2- 34km row3- 10km Results: 12km 22km 12km? /Ruth
Hello Ruth, is everything okay ?! I want to thank you for your help. The function solved almost everything, and I'll try to finish it, okay ?! I will continue to learn from you. Thanks!!!
Hi,Its a very good explanation. Actually, I would like to know how "LEAD" and "LAG" functions will work in Power BI.My Example, Just I want to populate the next/previous value in another column (not the cumulative).Appreciate!!!
Hi Ruth, Great video. I have been following your videos to learn DAX. Thank you so much. However, I wish to know whether EARLIER can be used to compare to different columns. I have the following requirement for a calculated column. Background: The "3+ Tasks in an hour" column calculates the numbers of tasks that has been received in the last 1 hour i.e "4" means, there are 4 tasks received (RequestDate) in the past hour. DAX: Column = CALCULATE(COUNTROWS(Data),FILTER(Data,Data[RequestDate]>EARLIER(Data[RequestDate])-TIME(1,0,0) && Data[RequestDate] 3 && the Request Date > EARLIER CloseDate; the "NewRequestDate" = "RequestDate" (e.g. TaskNumber = "E494539") The "3+ Task in an hour" > 3 && the Request Date < EARLIER CloseDate; the "NewRequestDate" = Earliest "CloseDate" (e.g. TaskNumber = "E494532",; "E494534"; "E494540" Please assist. TaskNumber RequestDate CloseDate 3+ Tasks in an Hour NewRequestDate > E494526 11/23/2019 0:19 11/23/2019 0:55 1 11/23/2019 0:19 E494529 11/23/2019 0:28 11/23/2019 1:14 2 11/23/2019 0:28 E494531 11/23/2019 0:49 11/23/2019 0:59 3 11/23/2019 0:49 E494532 11/23/2019 0:50 11/23/2019 1:14 4 11/23/2019 0:55 E494534 11/23/2019 0:57 11/23/2019 1:31 5 11/23/2019 0:59 E494539 11/23/2019 1:35 11/23/2019 1:55 4 11/23/2019 1:35 E494540 11/23/2019 1:39 11/23/2019 2:18 5 11/23/2019 1:55 E494541 11/23/2019 2:16 11/23/2019 2:32 3 11/23/2019 2:16 E494543 11/23/2019 3:28 11/23/2019 3:38 1 11/23/2019 3:28 E494544 11/23/2019 3:47 11/23/2019 4:00 2 11/23/2019 3:47'
Hi Ruth, I have a doubt regarding "Earlier".Does earlier only works with calculated column right? Because, whenever i try to create any measure by that, it does not work..Am i correct?
Great explanation Ruth. I think this is the best way to explain DAX, by showing what's going on in the vertipaq engine step by step
Congratulations Ruth. I've been lost trying understanding many other videos from you. And almost quitting this channel. But in this video especially you did a very good job. Following the steps: Show the problem -> Show what we want - > Show how it's done in excel (step-by-step) -> Show how to do over power BI (step-by-step). Very good.
Hi Leonardo,
Sorry to hear that. Is the DAx Fridays videos you find confusing?
/Ruth
@@CurbalEN . Yes. Exactly. I've been doing a course in DAX, since it has a path to follow along. But everytime i have a confusion in some function i come here to see your videos. However, lately, many of them i haven't been able to understand either. Why? I think you throw too fast the explanation of the functionality. I mean, you show how to do, but don't explain how it works. And is this background process that makes me get the real idea of the function. If you explain it more deeply in the process, and using excel to illustrate the steps, for example, so people can be bored, but they will understand, while others, like me will have the chance to understand that also. Everybody wins, just for some taking longer. And this is what happened in this video now. You went to excel and showed all the process. Therefore i understood, and loved it. But anyway thank you a lot for your explanations. When done like this last one, they are helping me a lot.
Ok, i understand.
It is not so much about boring people, but about me finding the time to do the videos at that detail. I do understand your point though and see why it would be useful for beginners.
I try in every video to explain what happens “behind” the scenes, but I do it with words rather than excel.
Let me see what I can do, but due to time constrains I won’t be able to promise anything.
Thanks a million for the detailed feedback!
/Ruth
Oh My God ! This is fantastic.. Though it is a 7 years old video it helped me a lot. I am new to power bi, trying to get a job. Glad I came to know about your channel. Thanks again
honestly i didn't anyone before can explain earlier like this before,
i love you girl.
It was really very useful. I had a lot of problems with the logic of this function, but you explained it very simply and fluently with an example. Great as always and thank you...
By the way, the phrase
earlier = current row
It was very important in education.
from 4 hr i was finding the solution to understand this concept your way of explanation is awesome you are making serious efforts in making content
Nice to hear!
/Ruth
thx. After several articles where smart guys tried to explain this function I got even more confused. This video is really helpful👍👍
Ruth, seu vídeo tem a melhor explicação sobre como usar a EARLIER. Muito obrigado
Thank you so much, Ruth! Great explanation. I love all your videos, you are so are amazing.👏❤
Hey Ruth. Excellent Video. You made it sound real easy. Nevertheless, since this is very important function, I believe this requires a second version (after your return from vacations) where Earlier is explained in terms of inner and outer evaluation contexts and explained how two row contexts are interacting in the above example and if we do not use Earlier inner evaluation context will yield the answer (that for calculating accumulated balance will not be correct).
+Bilal Zia Hi Bilial! Great idea :)
/Ruth
I love your teaching style
Thanks. This video explained Earlier in the best way possible.
Excellent! Glad to here :)
/Ruth
Excelente video Ruth! Justamente acababa de leer una parte del libro de Marcos Ruso y Alberto Ferrari sobre la función EARLIER pero no me quedó muy claro. Miré tu video y me quedó más que claro.
+manuel clavijo Estupendo Manuel, me alegra que mi vídeo te haya ayudado. Yo también he leído su libro y me pareció muy bueno.
Feliz Año!
/Ruth
This is explained Earlier in the best way possible.
Thank you!
/Ruth
Muchas gracias Ruth!!! hace cada vez mas fácil mi avance en el análisis de datos!... realmente tiene muy buenos métodos para ilustrar de forma sencilla temas complejos...
muy buen vídeo!!!
+Norberto Vera Reatiga Gracias Norberto! Poco a poco voy aprendiendo a hacer mejores vídeos y ha explicarme mejor :)
Por cierto, me gusto mucho tu infografia:
norbertoverareatiga.blogspot.se/2016/11/distribucion-de-la-prestacion-de.html?spref=tw&m=1
/Ruth
Gracias, disfruto mucho trabajando con datos!!!
Thank you, this is very good... Instead of using the Measure of [tot sales], you can also use SUM(Ex1[Total sales]). And you might get different results than expected if you have two rows with the same date.
The wonders of DAX ;), but that is what makes it fun right ?
Happy Friday!
/Ruth
@@CurbalEN Just for "grins and giggles" I tried the EARLIER function out on a string column and it works alphabetically. I can't think of an immediate application for that... But I'm sure there is one.
Thanks for a great explanation with examples. Made it so much more understandable seeing the excel example
I shot this video 5 times before I could make it somewhat understandable, glad it is working !!
Great Teaching, Ruth.
Hello, thank you for the videos. One question: imagine that I already have ACC SALES column. Now I want to add a new Column without an Accumulation (just deltas between one date and the next one). Using REVERSED ACC SALES BY DATES formula it doesn't work. Can you help me ?
Hi Ruth, Thank you for the awesome explanation. Could you please explain what would be the difference if I use selectedvalue function in place of earlier function in this example? Could you please give an example so that we can differentiate the use of these two functions?
only explanation I understood haha! Thanks a lot
Thank you this is crystal clear!
Hello,
I appreciate the quality of your videos and commend you for the clarity of your explanations. I'm wondering if it's possible to apply the "Earlier" function in a DAX measure for calculating the cumulative total of revenue by product category, for instance.
Very helpful. Thank you very much (as always) :))😇
Thanks for the video, the best explanation on earlier function
Glad to what!
/Ruth
Thanks, great explanation. I really loved the way you explained this!
Ruth, thanks for explanation about EARLIER function. I think Product 2 Total sales value must be 200*150=30 000
excelente tus ejemplos porfavo sigue como mas MEDIDAS DAX como values , contains etc. gracias por tu aporte siempre lo explicas muy bien y sencillo gracias :)
Gracias Luis Alberto, ya me quedan pocas functiones por cubrir ...
Microsoft va a tener quer crear mas :)
/Ruth
Thank you! This is very useful.
Great explanation! thanks
Excellent, So wonderfully explained, Thanks :)
Hi,Ruth.I created a calculated column using earlier function like, CALCULATE([total sales],FILTER('Table (2)',EARLIER('Table (2)'[numbers],2))).But,it shows error ,that is EARLIER/EARLIEST refers to an earlier row context which doesn't exist.What it means.
Even I faced the same issue, looking forward to a reply.
Below is my DAX Expression :
Cumm Salary = CALCULATE(SUM('Learn Earlier'[Salary]),FILTER('Learn Earlier',EARLIER(id)>='Learn Earlier'[Id]))
It says - Parameter is not correct type for EARLIER(id)
great video
Hi Ruth. Nicely explained.
Do you have any material on "Iterating Functions" in Power BI.
Many thanks
I do, for example all x functions are iterating functions
This helps, got stuck with this damm earlier😂😂
Hello, I have a DW with millions of rows, how can I avoid EARLIER, to filter the MAX of a date column, based on 2 conditions ? Can you help ?
Hi.. great work.. I am learning a lot from your videos....
I have a query .. what if, you dont have the date column.. how will you then give the condition ??
+RRR program Just use another column, earlier is not limited to dates.
/Ruth
Thanks for kind reply.. Sorry, but i didn't get you .... can you please elaborate.. suppose i dont have date column, then what is the criteria shall i write...
+RRR program If you have a specific case in mind, create a post in the power bi community and they will be able to help you!
/Ruth
one of the best video
Thanks!
Great video!
+Nowa K Thanks Nowa! :)
/Ruth
Obrigada, Ruth!!! ótima didática!
Genial!!
Recuerda pedirle a la gente que desactive el adblock al principio del video y que recargue la pagina para que se cargue el anuncio! Que te lo has currao!
No tengas vergüenza de pedirlo, que si a la gente le gustan tus videos te comprenderan y lo haran con gusto.
Gracias.
+portosssify Gracias por el tip, pero no tengo los anuncios activados, solamente en dos (el mínimo que me pide Google).
/Ruth
I tried the same but for me its showing error.
Reverse Account Sales = CALCULATE([Sales Amount],FILTER(DateC,DateC[Date]>=EARLIER(DateC[Date])))
EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
Hola Ruth,
Estaba intentado usar Earlier en una medida (campo calculado). Y me sale un error diciendo que Earlier tiene un contexto de fila anterior que no existe. Sera que solo se puede usar Earlier en columna calculadas. La use dentro de SUMX .Muy agradecido
Hello Ruth, I love your videos. I've got some feedback to explain EARLIER better. It was really confusing at the beginning because sometimes you place Earlier first and smts at the end. EARLIER(Exc1[Date] >= Exc1[Date] . I'd rather always keep the field from the table first and then, value to compare. For instance, It's easier to read x > 0, y >= 2, z
I see, thanks!
I recorded that video 3 times!! 😆
/Ruth
Great explanation! Thank you.
+Ahmar Mohammed You welcome Ahmar!
/Ruth
Hola Gracias por la explicacion! Animo con ese trabajo DAX fridays es un idea genial! un poco mas de fluides en la explicacion ayudaria, Excelente trabajo!
Hola Juan,
Muchas gracias :)
Un poco mas de que? fluides? Me temo que no te entendí!
/Ruth
Me encanta, que sencillo lo consigues hacer :) muuuuchas gracias !
Un placer :)
Hi Ruth I try the same formula on your pbix file provided but i dont know what the reason whenever i tried the Earlier Function under the column name it didnt suggest anything Could you please let me know
Are you creating a calculated column or a measure?
Como siempre, excelente presentación y buena metodología para explicar. Ruth quisiera preguntarte algo, tienes alguna idea de la diferencia entre esta función y EARLIEST?. Buscando en Internet, más allá de la definición no veo ningún ejemplo que pueda clarificar la diferencia entre ambas. Gracias! :)
Ya, tengo que hacer un tutorial de esa función, apuntado!
/Ruth
Nicely explained
Thanks :)
/Ruth
Bien explicado, Bendiciones desde Lima, Perú
Igualmente Piero!
/Ruth
excelente! lo malo es que ya no están disponibles los archivos :(
No los ves? Cuando yo voy los puedo ver?
Awesome ..Thak you so Much..Mam
Can you please help how do I solve lookup values if we have duplicate
Very clear
Hi Ruth,
Is EARLIER similar to the $column$row in Excel? Is it a way to fix the cell's value when you are comparing it with a changing value?
Hi Tomeu, Exactly, brilliant explanation!
And you do that row by row :)
/Ruth
Thanks Ruth. DAX Fridays is a very good idea and your explanations are very clear for everybody (even for people without knowledge, like me).Congratulations
Pleasure to be able to help :)
/Ruth
Can we just change the >= to
Hi Ruth, how are you? Great great video, but do you know how to do the cummulative in a matrix for example without dates or indexes? I mean, immagine you have first column with your products, like in this video and then you simply want to calculate cummulative amounts for each row... In your Excel example you have 3000, 200 and 2000 (row 1, 2 and 3). Using some trick I don't know, in the third row I want to return 5200 desregarding dates... Loking just to produtcs listed.
I think I show that here?
/Ruth
@@CurbalEN Sorry, I did not understand your reply. You mean you have showed here? I don't know If I explain correct... I want to do the cummulative considering just the products... Row 1 = Produt 1 with 3000; Row 2 = Product 2 with 200 and Row 3 = Product 3 with 2000. No dates in any dimension... So, I want to have a measure called for ex: Cummlative I will put besides Amount column and in the same row as product 3 I will have 5200.
So sorry! Forgot the link :
m.th-cam.com/video/d-Jk1j2G3nw/w-d-xo.html
/Ruth
@@CurbalEN Thank you so much! Challenge resolved in my data base! :) :)
Yey!!! 🎉🎉
Now you can 🍾...
/Ruth
Does this function only work with dates or can it just be a list of numbers or text?
Anything will work :)
Gracias Ruth!!, Oye eres muy buena compartiendo conocimiento.
Tengo una duda, y he pasado todo el dia dando vueltas en el asunto, siempre veo que el EARLIER lo usan con Fecha, es posible acumular sin tener la fecha, por ejemplo, acumular por producto.
Gracias, tus videos son una gran ayuda.
+Alexis Rojas Hidalgo Hola Alexis, dame un ejemplo de acumular por producto,
Ruth
Muchas gracias Ruth, le cuento que pude hacerlo.
1drv.ms/u/s!Av45wU--PqgJwh52sFfmra-nqzp7
Le dejo el link a OneDrive para que vea lo que queria hacer.
Muchas gracias por todo.
+Alexis Rojas Hidalgo Gracias Alexis, ya vi lo que querías hacer, muy bien!
/Ruth
Es que tengo muy buen coach ;-)
+Alexis Rojas Hidalgo Muchas gracias :)
Gracias por el video. Una consulta, por favor. Si en el caso que yo no quisiera sumar, sino solo obtener tal cual el ultimo valor o el valor anterior, con que función podría hacerlo?. Espero haberme explicado bien. Gracias.
+Dey JT No es posible poner columnas sin ninguna función. Dependiendo de lo que quieras hacer puedes usar VALUES o MAX, MIN..
Espero que esto te ayude,
/Ruth
Still can't understand why the results reversed when put EARLIER after the >=
3:26- What's the reason they don't allow us to connect to rows? It seems so easy to give us that capability.
I wondered about that myself and I got my answer when I understood how the DAX engine works:
m.th-cam.com/video/b8oSgTOeYCE/w-d-xo.html
Hi Ruth , thanks for this videos. Could you please explain why earlier is going to be evaluated against the whole date table. You did not write all[ date] so the way it is expressed earlier(Ex1,[date] >= Ex1 [date] it seems that it is evaluated with the current filter context. Why is it not Earlier(Ex1,[date]>= All(Ex1[Date] . Thanks
Hi Dave,
I did that video 4 times and I didn’t manage to get it right the fourth either?
You are correct on your assumption, sorry for the misunderstanding!
/Ruth
@@CurbalEN Hi Ruth , thanks for your reply. So I suppose it's just the normal behaviour of the forumla..
Hi Ruth,
I have a question about the first expression in Calculate(), why is it a measure of [Total Sales] instead of Sum([Total Sales])? Thanks!!
Thanks for ur videos ..they are awesome!!
If i write 2 formulas as - Column 2 = CALCULATE(SUM(Sheet1[price]),FILTER(Sheet1,Sheet1[date ]>=EARLIER(Sheet1[date ])))
or
Column = CALCULATE(SUM(Sheet1[price]),FILTER(Sheet1,EARLIER(Sheet1[date ])
Hi Ruth. Very didatic explanation. I have a situation that got me stuck. How do I get a value from a previous day when the dates are non contiguous. ie. Monday i need a value from Friday. There are Blank values in Saturday and Sunday).?
Best regards
+Fábio Coatis Mmm I dont have a straight answer for you, I would need to test myself. Do you have some sample data?
/Ruth
Got it, you can delete the link if you like.
/Ruth
Hi Fabio, I have your file, what are you trying to do exactly?
/Ruth
Hi Ruth. I'm trying to calculate the percentual difference in the first Matrix . The one with the non contiguous dates.
+Fábio Coatis Percentual difference between months? Can you show me the measure you are trying to build?
/Ruth
I'm unable to download to Excel files and Power BI files
So sorry... I am trying to fix all this, keep you updated!
/Ruth
Have you fixed this yet?
Thnk you so Much !
You welcome!! Glad it helped you :)
/Ruth
CAUTION ON THIS EXPLANATION!!!
One caution I would suggest with this explanation is that it may mistakenly give the viewer the impression that the EARLIER function has to do with *points in time*. This is not true. The example given---while valid---is only *coincidentally* evaluating two values based on whether one is “earlier” than the other. EARLIER could just as well be used in a comparison of dollars or text or Boolean or whatever. “Earlier” is not the comparison being made, *greater or equal to* is the comparison being made, and it only “relates” to the earlier-ness of the date in this example by mere coincidence.
EARLIER() “returns the current value of the specified column in an outer evaluation pass of the mentioned column”.
If I understand correctly, the “EARLIER” function results in a recursive evaluation of the table, and in this case will result in (essentially) TWO levels of table scans, the first (an outer or “earlier” scan context), and for each row in this outer scan, a second scan (an inner or “current” scan context). In each of the comparisons the outer (earlier) value will be compared to an inner (current) value.
Best Regards.
+Dev Expost Thanks for sharing your knowledge to us!
/Ruth
Many thanks too
Hi Curbal! Nice job. I got a question .... how to filter based on "same items" ?
Can you post in the power bi community? Share some sample data for quicker responses!
/Ruth
Hi, Thanks for info shared.
What if I have data which do not have dates & still I need to calculate ACC Sales, for Eg. If we need to do ABC Analysis, I need to identify ACC COGS, in that case how to use this function
Hi,
Post the question in the power Bi community and make sure you share sample data to get support quickly.
/Ruth
M5:=RANKX(FILTER(FactIncidents,EARLIER(FactIncidents[ActionType])=FactIncidents[ActionType]),[M2],,ASC,Dense)
I tried this above function in TOM Model but this is not working fine.
Can anyone help to create rank without duplicate?
In the Excel worksheet that you were using, you wrote "EARLIER = Current Row" in a corner. Remembering that simple thing is so helpful in understanding EARLIER. Also worth checking this link javierguillen.wordpress.com/2012/02/06/can-earlier-be-used-in-dax-measures/ where the author shows how to create nested row context in a measure. Interesting!
Hi Sandip,
If you publish a link to youtube comments, they will send it to the spam folder. I just found this there!
/Ruth
awesome! Thank you!
Buen día, tienes un canal en español?, o un canal que me recomiendes para seguir Dax en español. Gracias
+djeritorres Hola! No, no he hecho nada en español, a ve tengo tiempo y traduzco los vídeos,
/Ruth
Curbal
Gracias...
+djeritorres Por cierto, no conozco ningún canal en español, pero si veo alguno interesante te aviso.
/Ruth
Curbal
Gracias por tu atención...
Many Thanks
You welcome :)
/Ruth
Hi, I'm from Brazil and I'm following your channel, congratulations. How do I find the difference from one line to another by date? Can you help me? For example if each line had the km, how to calculate the difference? Thank you!!!
Sorry for my poor English.
Olá Claudinei! Do you mean that you would like to calculate the difference between the rows, so:
row 1- 12km
row2- 34km
row3- 10km
Results:
12km
22km
12km?
/Ruth
Hi, you´re very very speed...rs thanks!
Date ID Car KM difference
01/01/2017 EKK0855 50.000
02/01/2017 EKK0855 50.210 210
05/01/2017 EKK0855 50.500 290
15/01/2017 EKK0855 50.650 150
05/01/2017 EQT8004 80.300
15/01/2017 EQT8004 80.380 80
25/01/2017 EQT8004 80.425 45
04/02/2017 EQT8004 80.540 115
Try this:
Diff= if(ISBLANK(calculate(max([KM]),all(Table),Table[ID Car]=earlier(Table[ID Car]),Table[Date]
Hello Ruth, is everything okay ?!
I want to thank you for your help. The function solved almost everything, and I'll try to finish it, okay ?! I will continue to learn from you. Thanks!!!
+Claudinei Taiacolo Happy to help and have a great weekend!
/Ruth
I am getting an error downloading the work files.. can someone confirm if they do too?
The files have moved to the download center, link in the description box!
/Ruth
Hi,Its a very good explanation. Actually, I would like to know how "LEAD" and "LAG" functions will work in Power BI.My Example, Just I want to populate the next/previous value in another column (not the cumulative).Appreciate!!!
Hi Sarvade, Glad you liked the video!
Could you explain a bit more in detail the business case?
/Ruth
Curbal Thanks for quick response.. in your same example, I want just next day total sales in another column not the cumulative one.
Hi Sarvade, you wrote the same thing again. Can you explain in detail what you are trying to do?
/Ruth
Hi Ruth,
Please find below scenario. The source is only first two columns i.e. "Year" and "Total Sales"
Year
ToTal Sales
Next Year Sales
Diff
2013
20000
0
20000
2014
30000
20000
10000
2015
15000
30000
-15000
2016
45000
15000
30000
2017
10000
45000
-35000
Appreciate!!!
Thanks!
Thank you 🙏🙏
You welcome!
/Ruth
Thank you very much!!! *___*
You welcome and thanks for the feedback :)
/Ruth
Wow from india,🙂😍
🥳🥳
/Ruth
Hi Ruth, Great video. I have been following your videos to learn DAX. Thank you so much.
However, I wish to know whether EARLIER can be used to compare to different columns.
I have the following requirement for a calculated column.
Background: The "3+ Tasks in an hour" column calculates the numbers of tasks that has been received in the last 1 hour i.e "4" means, there are 4 tasks received (RequestDate) in the past hour.
DAX: Column = CALCULATE(COUNTROWS(Data),FILTER(Data,Data[RequestDate]>EARLIER(Data[RequestDate])-TIME(1,0,0) && Data[RequestDate] 3 && the Request Date > EARLIER CloseDate; the "NewRequestDate" = "RequestDate"
(e.g. TaskNumber = "E494539")
The "3+ Task in an hour" > 3 && the Request Date < EARLIER CloseDate; the "NewRequestDate" = Earliest "CloseDate"
(e.g. TaskNumber = "E494532",; "E494534"; "E494540"
Please assist.
TaskNumber RequestDate CloseDate 3+ Tasks in an Hour NewRequestDate >
E494526 11/23/2019 0:19 11/23/2019 0:55 1 11/23/2019 0:19
E494529 11/23/2019 0:28 11/23/2019 1:14 2 11/23/2019 0:28
E494531 11/23/2019 0:49 11/23/2019 0:59 3 11/23/2019 0:49
E494532 11/23/2019 0:50 11/23/2019 1:14 4 11/23/2019 0:55
E494534 11/23/2019 0:57 11/23/2019 1:31 5 11/23/2019 0:59
E494539 11/23/2019 1:35 11/23/2019 1:55 4 11/23/2019 1:35
E494540 11/23/2019 1:39 11/23/2019 2:18 5 11/23/2019 1:55
E494541 11/23/2019 2:16 11/23/2019 2:32 3 11/23/2019 2:16
E494543 11/23/2019 3:28 11/23/2019 3:38 1 11/23/2019 3:28
E494544 11/23/2019 3:47 11/23/2019 4:00 2 11/23/2019 3:47'
Could you please post this in the power BI community instead? Thanks!
/Ruth
Hi Ruth, I have a doubt regarding "Earlier".Does earlier only works with calculated column right? Because, whenever i try to create any measure by that, it does not work..Am i correct?
Hi,
Earlier is for calculated columns :)
/Ruth
what kind of a sick mind created a function named Earlier to point to the current date row? Earlier compared to what?
Onli hindi