Forum Discussion

jrescalante's avatar
jrescalante
Icon for Advocate I rankAdvocate I
8 years ago
Solved

Count Rows of Future Calendar Values

Hi everyone, :smileyhappy:   This is my first message looking for help. I always get the answers reading other cases in the forum, but in this im really stuck.   Im trying to calculate the number...
  • v-piga-msft's avatar
    8 years ago

    Hi jrescalante

     

    By my tests, you could create a measure to get your expected output.

     

    Weekends =
    SUMX (
        CALENDAR ( MIN ( 'Table'[Date] ), EOMONTH ( MAX ( 'Table'[Date] ), 0 ) ),
        IF ( WEEKDAY ( [Date], 2 ) IN { 6, 7 }, 1, 0 )
    )
    

     

    Hope this can help you !

     

    Best Regards,

    Cherry