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

DAX to calculate capacity before and after current line in table

Hi,

I am creating a report to see capacity before and after a train station. I only have the capacity on the train station, so I need to get the information from the last train station and the station after the current stop, at different hours of the day AND different years. The dataset is quite large, but what I need to do is find a formula that gives me the information from the last train station. 
So if I want to see the capacity before and after train station B, I would need to get capacity from A and C for different train-lines. 

Is there an equivalent of SUMIFS in DAX that can be used for this purpose?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

DAX has no concept of "previous" or "next". It is your responsibility to provide a suitable index field in your data.  You can then use that index for the  formulas.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

DAX has no concept of "previous" or "next". It is your responsibility to provide a suitable index field in your data.  You can then use that index for the  formulas.

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.