cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kolumam Member
Member

Difference between rows in direct query

Hi All,

 

I wanted to calculate the difference between the rows. Is it possible in direct query using power query or calculated column or measure? Please help. See below pic.

Capture.PNG

2 REPLIES 2
Highlighted
dearwatson Member
Member

Re: Difference between rows in direct query

Hi Koluman

 

Basically you can create 2 index columns and then self-join the columns to get the "previous row" value

then you just subtect them

 

here's a detailed post about ti

https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/power-bi-data-sources/p...

 

Cheers

Greg

"The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing." - Edward Tufte
Kolumam Member
Member

Re: Difference between rows in direct query

Hello,

 

Your solution doesn't work in direct query. It will work in import mode. Is there any other method? @dearwatson 

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors