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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
scruffychain
Regular Visitor

Expression.Error: We cannot apply field access to the type List. Details: Value=[List] Key=S

I am trying to use Power Query to give me the difference between consecuvtive start times in the table below. The second row "Start Time" needs to move to the first row of a new column. How do I do this? I tried using index function and using the following code: {[Index]+1}[Start Time] but I get the following error message : 

scruffychain_0-1637609798124.png

 


Expression.Error: We cannot apply field access to the type List. Details: Value=[List] Key=S

What is a good work around for this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @scruffychain ,

You can also consider using Dax to solve this problem

Here are the steps you can follow:

1. In Power query, Add Column – Index Column From 1.

vyangliumsft_1-1637808895954.png

2. Create calculated column.

New_Date =
var _1=CALCULATE(SUM('Table'[date]),FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table'[Index])+1))
return
IF(
    ISBLANK(_1),BLANK(),_1)

3. Result:

vyangliumsft_2-1637808895955.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @scruffychain ,

You can also consider using Dax to solve this problem

Here are the steps you can follow:

1. In Power query, Add Column – Index Column From 1.

vyangliumsft_1-1637808895954.png

2. Create calculated column.

New_Date =
var _1=CALCULATE(SUM('Table'[date]),FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table'[Index])+1))
return
IF(
    ISBLANK(_1),BLANK(),_1)

3. Result:

vyangliumsft_2-1637808895955.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

VahidDM
Super User
Super User

HI @scruffychain 

Add two index columns, first idex columns start from 1 and second one start from 0, then mege the table with it self and select the 1st and 2nd column:

VahidDM_0-1637623893032.png

 

 

then expand the column and selec the start date:

VahidDM_1-1637623934964.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

AlexisOlson
Super User
Super User

{[Index]+1} is just a list containing a single number, which doesn't have an associated field [Start Time].

 

You might be interested in my answer on StackOverflow or a recent post here:
https://community.powerbi.com/t5/Desktop/Calculating-Daily-values-from-Cumulative-Total/m-p/2198969

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors