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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vincenttys
Frequent Visitor

Count of days in financial year

Hi all,

I try to get the measure to calculate total days in a financial year.

I want the final output to show 365 days for 2021/2022. Even if i want to show my data by month, i also want it to show 365 days.

I have a date table and calculated financial year columns if that help.

 

Thank you

 

Regards,

Vince

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi  @vincenttys ,

 

Do you have a [financial year] column in your date table? If there is, you can try this measure.

 

Count of days =
CALCULATE (
    COUNT ( 'Date'[Date] ),
    ALLEXCEPT ( 'Date', 'Date'[financial year] )
)

 

If there isn't, you can add a [financial year] column in your date table then create the measure.

 

Financial Year =
IF (
    'Date'[Month] >= 7,
    'Date'[Year] & "/" & 'Date'[Year] + 1,
    'Date'[Year] - 1 & "/" & 'Date'[Year]
)

 

Result is as below.

RicoZhou_0-1659687845052.png

 

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi  @vincenttys ,

 

Do you have a [financial year] column in your date table? If there is, you can try this measure.

 

Count of days =
CALCULATE (
    COUNT ( 'Date'[Date] ),
    ALLEXCEPT ( 'Date', 'Date'[financial year] )
)

 

If there isn't, you can add a [financial year] column in your date table then create the measure.

 

Financial Year =
IF (
    'Date'[Month] >= 7,
    'Date'[Year] & "/" & 'Date'[Year] + 1,
    'Date'[Year] - 1 & "/" & 'Date'[Year]
)

 

Result is as below.

RicoZhou_0-1659687845052.png

 

Best Regards,
Rico Zhou

 

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

 

 

 

MahyarTF
Memorable Member
Memorable Member

Hi,

If you have Date, you could add the fiscal year to your Date Dim and then calculate the Count of the Days in each Financial year or put the slicer based on the particular field.

var _startOfFiscalYear=7 // set the month number that is start of the financial year. example; if fiscal year start is July, value is 7

"Fiscal Year",if(_startOfFiscalYear=1,YEAR([Date]),YEAR([Date])+ QUOTIENT(MONTH([Date])+ (13-_startOfFiscalYear),13))

Mahyartf

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.