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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
VitorNotaro34
New Member

Please Help me if you can.

Hello good morning all.

 

I am quiet new with Power BI, and at the moment I am trying to do some pratices converting old Excel Formuls to DAX or M.

 

I have the below situation with a mixed formule in XL, is just multipe condicoes to generete a new column, its basicaly IF+AND (If assembler is the same, (If date is the same,(Calculate the Gap for the next Picking), If the GAP result is smaller than 5 hours bring me the result, if NOT retunr a 00:00:00)

 

The question is, based in your exeperience , is it possible to biuld it with DAX and avoid to creat this column on the model ?

If Yes wich formules do I need ? Does anybody can help me to do it please ?

 

If is not possible to do in DAX How to do it in M ? I already know I would need to creat a function ( )=> but I am not getting progress.  Someone Can help me please ?

 

Thanks in advanced.

 

Capture.PNG

 

2 REPLIES 2
lbendlin
Super User
Super User

You actually have bigger problems than that. Fetching data from the "previous" row is non-trivial in DAX. You need to have a guaranteed sort order for that. Can  the combination of A,B and C serve as that sort key? Or better yet, can you add an index column?

Hi Man.

 

First of all thanks very much for reply, I really apreciate that.

 

About Sort the columns I dont think so is a problem cause I can creat a step into Power Querry to sort by Assembler,Date and Time, this would garrantee the correct sequence always.

 

Yes for sure would be possible Add a index Column but how this could help me ?

 

Thanks in Advance 

 

What is the plan for that ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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