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
Daniels2204
Frequent Visitor

I need to find the Difference between rows as anincome criteria date

Hi,

 

I have a table with hodometers for trucks, i need to find the difference (kilometers) between rows as an income criteria date, additionally the tables are in import mode, but it would be great to work in directquery mode

 

Daniels2204_0-1596481461875.png

Aplly this foumula but it does not generate an error not does it generate data, everything is blank

 
 
 
Daniels2204_0-1596482577129.png

 

 

 

the data is:

 

Daniels2204_0-1596482142866.png

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @Daniels2204 ,

 

You cna have a lok at this blog to get your previous values.

 

https://community.powerbi.com/t5/Community-Blog/Getting-Previous-Values-in-Power-BI-Part-1/ba-p/1143...

 

 

Regards,

Harsh Nathani

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@Daniels2204 , If you are on direct Query? Replace earlier with max and Try as a measure.

 

Can you share sample data and sample output in table format? and confirm that you are on direct query. I will try by loading this to DB

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @Daniels2204 ,

 

You cna have a lok at this blog to get your previous values.

 

https://community.powerbi.com/t5/Community-Blog/Getting-Previous-Values-in-Power-BI-Part-1/ba-p/1143...

 

 

Regards,

Harsh Nathani

Thanks, @harshnathani 

 

This is a board with information filter

Daniels2204_0-1596655323608.png

 

Greg_Deckler
Community Champion
Community Champion

@Daniels2204 - Wait, I just realized that you are in DirectQuery and you are thus creating a measure and not a calculated column. That's a pretty significant difference. Is that an accurate statement?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi, @Greg_Deckler 

 

Thank you very much for your interest, I´m in duplex mode and I´m not taking measurements, only columns

 

Daniels2204_0-1596484161815.png

 

Greg_Deckler
Community Champion
Community Champion

@Daniels2204 - Looks like you are following the pattern similar to here which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...

 

Can't see your DATE_IN column so maybe the issue is there? The overall approach seems valid likely an issue with your FILTER I am guessing.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.