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

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

Reply
Syndicate_Admin
Administrator
Administrator

Interactive License Days Calculation with the filter

Hello everyone, I hope you are well.

I have a problem with a measure that I am carrying out to be able to calculate the days of leave that professionals take. Previously, they had helped me with the following measure that answered the question


"If a person has a license that starts on 01/25 and ends on 02/10, he brings only the 6 days of January and February 10"

the Measure was as follows:

Days count = 
VAR MaxDate = MAX(Calendario[Fecha])
VAR MinDate = MIN(Calendario[Fecha])

RETURN 
    SUMX
    (
        Licencias,
        DATEDIFF
        ( 
            MAX( Licencias[INICIO], MinDate ),
            MIN( Licencias[FIN], MaxDate),
            DAY
        ) + 1
    )

But I have a problem, as my filter is related to the start of the license, when placing the filter in the following month, it no longer counts the licenses of January, that is, the measure will not bring the 10 days corresponding to February because it filters the licenses of January and does not take them.

0 REPLIES 0

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.