Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I need to create 2 columns. One that shows the Prior Month FCST value from the same project and another that shows if the "Status" changed on that project.
FCST Date | Status | Project | FCST | Prior Month | Status Change from Prior Month |
1/1/2024 | In-Forecast | Alpha | 100 | ||
1/1/2024 | In-Forecast | Gamma | 200 | ||
1/1/2024 | In-Ideation | Sigma | 300 | ||
2/1/2024 | In-Forecast | Alpha | 400 | 100 | F |
2/1/2024 | In-Forecast | Gamma | 500 | 200 | F |
2/1/2024 | In-Forecast | Sigma | 600 | 300 | T |
3/1/2024 | In-Forecast | Alpha | 700 | 400 | F |
3/1/2024 | In-Forecast | Gamma | 800 | 500 | F |
3/1/2024 | In-Forecast | Sigma | 900 | 600 | F |
Solved! Go to Solution.
pls try this
Proud to be a Super User!
Hi @griffinst
Maybe you can try this:
Here I create 2 calculated columns:
_Prior Month =
CALCULATE (
SUM ( 'Table'[FCST] ),
ALLSELECTED ( 'Table' ),
'Table'[Project] = EARLIER ( 'Table'[Project] ),
DATEADD ( 'Table'[FCST Date], -1, MONTH )
)
_Status Change? =
VAR _priorStatus =
CALCULATE (
SELECTEDVALUE ( 'Table'[Status] ),
ALLSELECTED ( 'Table' ),
'Table'[Project] = EARLIER ( 'Table'[Project] ),
DATEADD ( 'Table'[FCST Date], -1, MONTH )
)
RETURN
IF ( _priorStatus <> BLANK (), IF ( 'Table'[Status] = _priorStatus, "F", "T" ) )
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @griffinst
Maybe you can try this:
Here I create 2 calculated columns:
_Prior Month =
CALCULATE (
SUM ( 'Table'[FCST] ),
ALLSELECTED ( 'Table' ),
'Table'[Project] = EARLIER ( 'Table'[Project] ),
DATEADD ( 'Table'[FCST Date], -1, MONTH )
)
_Status Change? =
VAR _priorStatus =
CALCULATE (
SELECTEDVALUE ( 'Table'[Status] ),
ALLSELECTED ( 'Table' ),
'Table'[Project] = EARLIER ( 'Table'[Project] ),
DATEADD ( 'Table'[FCST Date], -1, MONTH )
)
RETURN
IF ( _priorStatus <> BLANK (), IF ( 'Table'[Status] = _priorStatus, "F", "T" ) )
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I got the Prior Month working. Thank you very much. I had to add the Business Area and LOB to the formula as it needs to match the "Project", "Business Area", and "LOB" of the prior month.
For the Status Change though I added the same for Business Area and LOB but it is not working as expected.
pls try this
Proud to be a Super User!
I got it working with a combination from both of you. thank you very much.
you are welcome
Proud to be a Super User!
Hi @griffinst
You can create a measure using DATEADD to move the values:
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
This did not work for the Status Change "T" or "F" column. It's showing "F" for everything even though I change one of the status'.
I need these to be columns not measures.
@griffinst Edited to included Status change T or F
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |