Forum Discussion
I need help
hi AlexGallet01
Try in this way:
1. A Calendar table with Fiscal Year, and Fiscal Month Number Columns
Fiscal Year = IF ( MONTH ( 'Calendar'[Date] ) <= 6, 'Calendar'[Year], 'Calendar'[Year] + 1 )
Fiscal Month =
IF (
MONTH ( 'Calendar'[Date] ) <= 6,
'Calendar'[Month] + 6,
'Calendar'[Month] - 6
)2. A new Measure
ValuesThisYear =
CALCULATE (
SUM ( Table1[Value] ),
DATESBETWEEN (
'Calendar'[Date],
CALCULATE (
FIRSTDATE ( 'Calendar'[Date] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Fiscal Year] = MIN ( 'Calendar'[Fiscal Year] )
)
),
LASTDATE ( 'Calendar'[Date] )
)
)3. Insert a slicer
4. Insert a Visual Clustered Column Chart
5. If you need to sort the months Select MonthN and Sort by Fiscal Month
Hi
I have a problem when i want create a column fiscal year i have an error ( Expressions that return a variant data type can not be used to define computed columns.)
- v-qiuyu-msft9 years agoCommunity Support
AlexGallet01 wrote:
Hi
I have a problem when i want create a column fiscal year i have an error ( Expressions that return a variant data type can not be used to define computed columns.)
Did you try to create a calculated column like this?
Fiscal Year = IF ( MONTH ( 'Calendar'[Date] ) <= 6, 'Calendar'[Year], 'Calendar'[Year] + 1 )
Please check if the 'Calendar'[Year] data type is number rather than text. If issue persists, please share your .pbix file if possible.
Best Regards,
Qiuyun Yu