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.
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:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |