This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi All,
I am preparing a sales report where I want to show accounts which moved from one stage to another in the previous week.
| Week | Stage | Account Name | Previous Week |
| 10/16/2020 | Proposal Submitted | ABC | - |
| 10/16/2020 | Discovery | XYZ | - |
| 10/23/2020 | Contract Negotication | ABC | Proposal Submitted |
| 10/23/2020 | Discovery | XYZ | Discovery |
| 10/30/2020 | Won | ABC | Contract Negotication |
| 10/30/2020 | Proposal Submitted | XYZ | Discovery |
I want to calculate the Previous week column using DAX. Any help is appreciated. If I need to create any helper columns to identify previous week also, I can do.
Thanks,
Bhuvaraghan
Solved! Go to Solution.
@Bhuvaraghan , Try a new column like
maxx(filter(table, [Week] = earlier([Week])-7 && [Account ] = earlier([Account ])),[Stage])
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Hi @Bhuvaraghan ,
You can also create a column like so:
Column =
CALCULATE (
MAX ( 'Table'[Stage] ),
FILTER (
'Table',
'Table'[Account Name] = EARLIER ( 'Table'[Account Name] )
&& 'Table'[Week]
= EARLIER ( 'Table'[Week] ) - 7
)
)
It works the same as what @amitchandak provided.
Best regards
Icey
If this post helps,then consider Accepting it as the solution to help other members find it faster.
Thanks a lot, worked like a charm 🙂
@Bhuvaraghan , Try a new column like
maxx(filter(table, [Week] = earlier([Week])-7 && [Account ] = earlier([Account ])),[Stage])
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Thanks a lot for your help 🙂
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 21 | |
| 18 |