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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
afaro
Helper II
Helper II

How to find the change between any two rows dynamically?

I have weekly data for each product. I want to find out the change between any two weeks of given product given I have a timestamp column specifying all relevant date/time info.  How do I do this? 

 

Thank you in advance. 

 

 

2 REPLIES 2
v-xinruzhu-msft
Community Support
Community Support

Hi @afaro 

Based on your description, you can consider to use datesinperiod() function.

e.g 

Measure =
CALCULATE (
    [Measure],
    DATESINPERIOD ( calendar[date], MAX ( 'Date'[Date] ), -14, DAY )
)

You can refer to the link about the function.

DATESINPERIOD function (DAX) - DAX | Microsoft Learn

 

Best Regards!

Yolo Zhu

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

 

 

 

 

DATESINPERIOD

audreygerred
Super User
Super User

Hi! Assuming you have a robust Date dim table, you can utilize the following links to do your week basewd time intelligence.

Week-Based Time Intelligence in DAX - SQLBI

Week-related calculations – DAX Patterns




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.