Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi, all. I have the following table with multiple projects.
I need a new column called Fiscal Year that is calculated based on the following criteria:
Solved! Go to Solution.
@PBInewbie17 Try:
FY Column =
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),"FY21",
[Action_Date] >= DATE(2022,10,1) && [Action_Date] <= DATE(2023,9,30),"FY21",
BLANK()
),
BLANK()
)
@PBInewbie17 Try:
FY Column =
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),"FY21",
[Action_Date] >= DATE(2022,10,1) && [Action_Date] <= DATE(2023,9,30),"FY21",
BLANK()
),
BLANK()
)
Thank you, Greg. One other caveat: I have another column called Days_between_Actions that 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 formula below is excluding certain days from the calculation. For example, it's showing 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?
FY Column =
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 ()
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 12 | |
| 8 | |
| 5 |