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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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