Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi, all. I have this table with multiple projects.
I used the formula below to calculate a new column called Fiscal Year, based on the following criteria:
Fiscal Year =
VAR __Seq = [Sequence]
VAR __Project = [Project]
VAR __Action = [Action_Name]
VAR __Table =
FILTER ( 'Table', [Project] = __Project )
VAR __MaxSeq =
MAXX ( __Table, [Sequence] )
RETURN
IF (
__Seq = __MaxSeq
&& ( __Action = "Returned app"
|| __Action = "Completed app" ),
SWITCH (
TRUE (),
[Action_Date] >= DATE ( 2020, 10, 1 )
&& [Action_Date] <= DATE ( 2021, 9, 30 ), "FY21",
[Action_Date] >= DATE ( 2021, 10, 1 )
&& [Action_Date] <= DATE ( 2022, 9, 30 ), "FY22",
[Action_Date] >= DATE ( 2022, 10, 1 )
&& [Action_Date] <= DATE ( 2023, 9, 30 ), "FY23",
BLANK ()
),
BLANK ()
)
The problem with this formula is that it’s causing an error in the cumulative total of Days_between_Actions, since it excludes certain days from the calculation. The Days_between_Actions column is used to calculate the total number of days to complete a project (e.g., Project A took 24 days to complete [13 + 11 = 24]). The current formula for Fiscal Year calculates Project A as 11 days instead of the correct 24. How can I adjust the formula to ensure the Days_between_Actions column isn't affected?
Solved! Go to Solution.
Hi @PBInewbie17 ,
You can consider creating a measure to achieve cumulation:
Measure =
SUMX(
FILTER(ALLSELECTED('Table'),
'Table'[Action_Date]<=MAX('Table'[Action_Date])&&'Table'[Project]=MAX('Table'[Project])),[Days_between_Actions])
Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @PBInewbie17 ,
You can consider creating a measure to achieve cumulation:
Measure =
SUMX(
FILTER(ALLSELECTED('Table'),
'Table'[Action_Date]<=MAX('Table'[Action_Date])&&'Table'[Project]=MAX('Table'[Project])),[Days_between_Actions])
Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
There is still an issue. When I filter by Fiscal Year, the number of days in the Measure changes. It should remain the same. Please see the screenshot.
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 |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |