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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AlexJim
New Member

Cumulative rate same month

 

Hello

I'm trying to have a measure that results in the cumulative rate up to the specific year, considering the same months of prior years, as shown below. 

 

AlexJim_2-1661247819082.png

 

I found a solution like this but it works for years and don't know how to build this for same month periods

 

=EXP(
     SUMX(FILTER(ALL(Rates), Rates[Year]<=MAX(Rates[Year])),
          LN(1 + Rates[Rate])))

 

 

I'd appreciate if anyone can help me on this.

 

Thanks!

 

Alex

 

1 ACCEPTED SOLUTION

Hi @AlexJim ,

Please try this measure:

Measure =
VAR _m =
    MAX ( 'Table'[Date] )
VAR _f =
    FILTER (
        ALLSELECTED ( 'Table' ),
        YEAR ( [Date] ) = YEAR ( _m )
            && MONTH ( [Date] ) = MONTH ( _m )
            && [Date] <= _m
            && [Product] = MAX ( 'Table'[Product] )
    )
RETURN
    PRODUCTX ( _f, [Rate] + 1 )

Result:

vchenwuzmsft_0-1661506357009.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

3 REPLIES 3
tamerj1
Super User
Super User

Hi @AlexJim 
Please refer to the attached sample file with the solution 

1.png

Comulative Rate = 
VAR CurrentDate = 
    MAX ( Rates[Date] )
VAR CurrentMonthTable =
    FILTER ( ALLSELECTED ( Rates ), MONTH ( Rates[Date] ) = MONTH ( CurrentDate ) )
VAR TableOnAndBefore = 
    FILTER ( CurrentMonthTable, Rates[Date] <= CurrentDate )
RETURN
    PRODUCTX ( TableOnAndBefore, 1 + Rates[Rate] )

Very helpful, thanks. I realise I need to split by product as well, but does not seem to filter properly. Sorry for my low level of DAX knowledge.

 

Thanks

 

Alex

 

 

AlexJim_0-1661275220127.png

 

Hi @AlexJim ,

Please try this measure:

Measure =
VAR _m =
    MAX ( 'Table'[Date] )
VAR _f =
    FILTER (
        ALLSELECTED ( 'Table' ),
        YEAR ( [Date] ) = YEAR ( _m )
            && MONTH ( [Date] ) = MONTH ( _m )
            && [Date] <= _m
            && [Product] = MAX ( 'Table'[Product] )
    )
RETURN
    PRODUCTX ( _f, [Rate] + 1 )

Result:

vchenwuzmsft_0-1661506357009.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.