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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
91asma2
Helper I
Helper I

cumulative count with independent date tables

 
1 REPLY 1
Anonymous
Not applicable

These measures are the best I can do with the limited amount of info that you've given.

// If you select year-months from the two
// tables, you should never use the YearMonth
// field from 'Date' in the UI. This column
// should be hidden.

[Measure] =
var YearMonthStart =
    SELECTEDVALUE( StartDate[StartYearMonth]
var YearMonthEnd = 
    SELECTEDVALUE( EndDate[EndYearMonth]
var Result =
    CALCULATE(
        [Measure1],
        KEEPFILTERS( 
            'Date'[YearMonth] >= YearMonthStart ),
        KEEPFILTERS(
            'Date'[YearMonth] <= YearMonthEnd )
    )
RETURN
    Result
    
    
[Cumulative Registration] =
var MaxVisibleDate = MAX('Date'[Date] )
var Result =
    CALCULATE(
        CALCULATE(
            DISTINCTCOUNT( User[UserID] ),
            KEEPFILTERS( 
                'Date'[YearMonth] >= YearMonthStart ),
            KEEPFILTERS(
                'Date'[YearMonth] <= YearMonthEnd ),
            KEEPFILTERS( 
                'Date'[Date] <= MaxVisibleDate )
        ),
        ALLSELECTED( 'Date' )
    )
RETURN
    Result

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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