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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
flinke
New Member

How do I display remaining holidays in a table?

Hello,

I hope you can help me - thanks in advance. I want to create a table of how many remaining holidays an employee has for that specific month with an extra field for the year that accounts the remaining holidays for the year by also considering the previous years. If you look at the table below you can see that there have been 3 days left for 2016. Though while having -2 days in total for 2017 in December 2017 the final result for 2017 will be 1 (considering the 3 days of 2016 --> 3-2=1). Same goes for 2018: the employee has 13 days left and 1 day remaining from 2017; therefore he will have a result of 14 days in 2018. The numbers in the month fields represent the amount of holidays left at that specific point in time for that year.

 

 2016-112016-12Remaining Days in 2016 2017-012017-022017-112017-12Remaining Days in 20172018-012018-022018-12Remaining Days in 2018
Employee A 10332020 17-212018 1314
1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @flinke,

 

Please try below formulas:

Remaining days in Month12 = 
IF (
    'Holiday Remain'[YearMonth].[MonthNo] = 12,
    CALCULATE (
        SUM ( 'Holiday Remain'[Remaining holidays] ),
        FILTER (
            ALLEXCEPT ( 'Holiday Remain', 'Holiday Remain'[Employee] ),
            'Holiday Remain'[YearMonth].[Year]
                = EARLIER ( 'Holiday Remain'[YearMonth].[Year] )
                && 'Holiday Remain'[YearMonth].[MonthNo] = 12
        )
    ),
    BLANK ()
)

remaining days per year = 
CALCULATE (
    SUM ( 'Holiday Remain'[Remaining days in Month12] ),
    FILTER (
        ALLEXCEPT ( 'Holiday Remain', 'Holiday Remain'[Employee] ),
        'Holiday Remain'[YearMonth].[Year]
            <= EARLIER ( 'Holiday Remain'[YearMonth].[Year] )
            && 'Holiday Remain'[YearMonth].[MonthNo]
                <= EARLIER ( 'Holiday Remain'[YearMonth].[MonthNo] )
    )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @flinke,

 

Please try below formulas:

Remaining days in Month12 = 
IF (
    'Holiday Remain'[YearMonth].[MonthNo] = 12,
    CALCULATE (
        SUM ( 'Holiday Remain'[Remaining holidays] ),
        FILTER (
            ALLEXCEPT ( 'Holiday Remain', 'Holiday Remain'[Employee] ),
            'Holiday Remain'[YearMonth].[Year]
                = EARLIER ( 'Holiday Remain'[YearMonth].[Year] )
                && 'Holiday Remain'[YearMonth].[MonthNo] = 12
        )
    ),
    BLANK ()
)

remaining days per year = 
CALCULATE (
    SUM ( 'Holiday Remain'[Remaining days in Month12] ),
    FILTER (
        ALLEXCEPT ( 'Holiday Remain', 'Holiday Remain'[Employee] ),
        'Holiday Remain'[YearMonth].[Year]
            <= EARLIER ( 'Holiday Remain'[YearMonth].[Year] )
            && 'Holiday Remain'[YearMonth].[MonthNo]
                <= EARLIER ( 'Holiday Remain'[YearMonth].[MonthNo] )
    )
)

1.PNG

 

Best regards,

Yuliana Gu

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors