Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ph
Helper I
Helper I

DAX example from italians - explanantion

Hi all,

 

I am absolutely desparate of DAX...I found on youtube video from Italians for beginners (it s look like that is for newbies, but it isn t) and I dont understand mentioned example (https://www.youtube.com/watch?v=6ncHnWMEdic) it starts in 22:22 it takes 10 seconds, the result is on 29:15 (sorry I dont know how to insert picture here or it does not works).. I saw first video, and this example 3x and still nothing, really is this video for beginners? uhh..

 

 

My questions are:

Why are used 2 row context and not filter context for each price? 

Why is used 'ROWCOUNT' and not SORTING and then some other funcion?

Why is used 'FILTER' ?

Why is used 'EARLIER'?

 

thank you so much !!!!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

1. The 1st row context comes from the the table in which you are trying to insert a calculated column. The second row context comes from FILTER, which is an iterator. Hence 2 different row contexts.

2. Sorting does not exist in DAX.

3. FILTER filters data according to a condition returning only the rows that pass the condition.

4. EARLIER is a way to obtain the value from a previous row context. Since VARiables have been introduced, there is now no need to use this function. You can grab the value and assign it to a VARiable that will hold it for the duration of the calculation, whatever the calculation is.

Best
Darek

View solution in original post

1 REPLY 1
Anonymous
Not applicable

1. The 1st row context comes from the the table in which you are trying to insert a calculated column. The second row context comes from FILTER, which is an iterator. Hence 2 different row contexts.

2. Sorting does not exist in DAX.

3. FILTER filters data according to a condition returning only the rows that pass the condition.

4. EARLIER is a way to obtain the value from a previous row context. Since VARiables have been introduced, there is now no need to use this function. You can grab the value and assign it to a VARiable that will hold it for the duration of the calculation, whatever the calculation is.

Best
Darek

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.