March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi!
I have the following table:
MONTH | STATUS |
18-Jan | Open |
18-Feb | WIP |
18-Mar | Closed |
18-Apr | Open |
18-May | WIP |
18-Jun | Closed |
18-Jul | Open |
18-Aug | WIP |
18-Sep | Closed |
18-Oct | Open |
18-Nov | WIP |
18-Dec | Closed |
I want to have a column that returns the status of the previous month for each row like below:
MONTH | STATUS | STATUS (PREVIOUS MONTH) |
18-Jan | Open | |
18-Feb | WIP | Open |
18-Mar | Closed | WIP |
18-Apr | Open | Closed |
18-May | WIP | Open |
18-Jun | Closed | WIP |
18-Jul | Open | Closed |
18-Aug | WIP | Open |
18-Sep | Closed | WIP |
18-Oct | Open | Closed |
18-Nov | WIP | Open |
18-Dec | Closed | WIP |
I tried to create a Calculated column using the following DAX:
Solved! Go to Solution.
Hii @ptewary,
Create an index column for "Status" in edit query as shown in image:
Then create a calculated column in your table:
Thanks @mohittimpus
This is basically the solution but the only issue is that what if the dates are not in order, then using the Index column would not be helpful. But nonetheless, using the EARLIER function helped to tackle the Circular Dependency issue. So, I tweaked my DAX formula to make it:
Hii @ptewary,
Create an index column for "Status" in edit query as shown in image:
Then create a calculated column in your table:
Thanks @mohittimpus
This is basically the solution but the only issue is that what if the dates are not in order, then using the Index column would not be helpful. But nonetheless, using the EARLIER function helped to tackle the Circular Dependency issue. So, I tweaked my DAX formula to make it:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |