Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Himanshu_1306
Helper V
Helper V

Fiscal Period Calculations

Hi All,

 

I want to create a calculated column where I can get Current Fiscal year = True else False and Current fiscal quarter = True else False.

 

We follow Month end approach so quarter are like below:

 

Q1 - Feb- Apr

Q2 - May- Jul

Q3 - Aug - Oct

Q4 - Nov-Jan

 

I have the below columns in my dataset.

 

Kindly help in computing the calculated columns for my report.

 

Himanshu_1306_0-1672661921953.png

 

1 ACCEPTED SOLUTION

Hi @Himanshu_1306 ,

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 ()
    )

yingyinr_1-1672739192596.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Jayee
Responsive Resident
Responsive Resident

Hi @Himanshu_1306 ,

 

Please try below dax as Calculated Columns

 

Current Fiscal Year = if(Full_Date=Year(Today()),"True","False")

Current Fiscal Quarter = if(Full_Date=Quarter(Today()),"True","False")

If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!! 

Hi Jayee,

 

These calculations wont work as we follow month end approach for Quarter as stated above.

 

If I take current quarter based on Date it shows Quarter = 1 but as per the fiscal Quarter we are in Quarter 4 till 31st Jan'2023.

 

My Quarter Scenarios: 

 

Q1 - Feb- Apr

Q2 - May- Jul

Q3 - Aug - Oct

Q4 - Nov-Jan

Hi @Himanshu_1306 ,

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 ()
    )

yingyinr_0-1672729412998.png

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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)

I 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]
RETURN
    IF (
        ( _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 ()
    )

Hi @Himanshu_1306 ,

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 ()
    )

yingyinr_1-1672739192596.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Hi @Himanshu_1306 ,

The formula used the function TODAY(), it will return the current date which you check the report. For example, if you check the report on Feb 1, 2023, the function TODAY() will return the date Feb 1, 2023. And yes, the fiscal year will be 2024 and quarter will be 1... It is not required to change anything for the formula....

yingyinr_0-1672799002736.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks so much for the help !!!

 

Regards

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.