Forum Discussion
Fiscal Period Calculations
- Anonymous3 years ago
Hi Anonymous ,
I updated my sample pbix file(see the attachment), please check if that is what you want.
Current Fiscal Year (Yes/No) = VAR _year = YEAR ( TODAY () ) VAR _month = MONTH ( TODAY () ) VAR _fyear = 'Table'[FISCAL_YEAR] RETURN IF ( ( _month = 1 && _year = _fyear) || ( _month > 1 && _year + 1 = _fyear ), TRUE (), FALSE () )Current Fiscal Quarter (Yes/No) = VAR _month = MONTH ( TODAY () ) VAR _fyear = 'Table'[FISCAL_YEAR] VAR _fquarter = 'Table'[FISCAL_QUARTER] RETURN IF ( ( _month = 1 && 'Table'[FISCAL_QUARTER] = 4 ) || ( _month > 1 && QUARTER ( EOMONTH ( TODAY (), -1 ) ) = 'Table'[FISCAL_QUARTER] ), TRUE (), FALSE () )Best Regards
Hi Anonymous ,
You can create a calculated column as below to get it, please find the details in the attachment.
Current Fiscal year and quarter =
VAR _year =
YEAR ( TODAY () )
VAR _month =
MONTH ( TODAY () )
VAR _fyear = 'Table'[FISCAL_YEAR]
VAR _fquarter = 'Table'[FISCAL_QUARTER]
RETURN
IF (
( _month = 1
&& _year = _fyear
&& 'Table'[FISCAL_QUARTER] = 4 )
|| (
_month > 1
&& _year + 1 = _fyear
&& QUARTER ( EOMONTH ( TODAY (), -1 ) ) = 'Table'[FISCAL_QUARTER]
),
TRUE (),
FALSE ()
)
If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi,
Thanks for the response.
I actually want 2 different columns for Current Fiscal year and Fiscal Quarter.
Column 1 : Current Fiscal Year (Yes/No)
Column 2 : Current Quarter (Yes/No)
- Anonymous3 years agoNot applicableI used the below calculation and it seems to work but can we have 2 different columns using this?Current Fiscal year and quarter =VAR _year =YEAR ( TODAY () )VAR _month =MONTH ( TODAY () )VAR _fyear = F_MARKETING_RESPONSE[FISCAL_YEAR]VAR _fquarter = F_MARKETING_RESPONSE[FISCAL_QUARTER]RETURNIF (( _month = 1&& _year = _fyear&& F_MARKETING_RESPONSE[FISCAL_QUARTER] = 4 )|| (_month > 1&& _year + 1 = _fyear&& QUARTER ( EOMONTH ( TODAY (), -1 ) ) = F_MARKETING_RESPONSE[FISCAL_QUARTER]),TRUE (),FALSE ())
- Anonymous3 years agoNot applicable
Hi Anonymous ,
I updated my sample pbix file(see the attachment), please check if that is what you want.
Current Fiscal Year (Yes/No) = VAR _year = YEAR ( TODAY () ) VAR _month = MONTH ( TODAY () ) VAR _fyear = 'Table'[FISCAL_YEAR] RETURN IF ( ( _month = 1 && _year = _fyear) || ( _month > 1 && _year + 1 = _fyear ), TRUE (), FALSE () )Current Fiscal Quarter (Yes/No) = VAR _month = MONTH ( TODAY () ) VAR _fyear = 'Table'[FISCAL_YEAR] VAR _fquarter = 'Table'[FISCAL_QUARTER] RETURN IF ( ( _month = 1 && 'Table'[FISCAL_QUARTER] = 4 ) || ( _month > 1 && QUARTER ( EOMONTH ( TODAY (), -1 ) ) = 'Table'[FISCAL_QUARTER] ), TRUE (), FALSE () )Best Regards
- Anonymous3 years agoNot applicable
Calculations are working perfectly for current fiscal year and quarter.
Just wanted to know if i'll have to change anything in the calculation for next fiscal quarter as both fiscal quarter and fiscal year will change? from 1st Feb it'll be Fiscal year = 2024 and Quarter = 1 for me