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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Measure error on rolling 12 month calculated column

Hi Experts

 

I cannot work out where i am going wrong with the following rolling 12 months measure. See calculate column measure i would like to keep the current measure and amend if possible...

 

For Jan 19 The result is correct 60%

 

For Feb 19 The result is worng and should be the Sum of (81,788,374+94393580) / (135,605,381 + 137602264) = 64%

not (94393580) / (137602264) which the measure is returning. 

 

See expected result in excel image

 

Capture.PNG

 

Sample PBIX

 

 

 

 

 

 

 

 

 

 

 

Sample Data

https://www.dropbox.com/s/e280kz8rl9x0i4u/SSAMPLE.pbix?dl=0

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

The result for row 8 should be 64.15%.

(81,788,374+94,393,580+98,235,790)/(135,605,381+137,602,264+154,585,590)=0.6415

Column =
VAR _res =
    CALCULATE (
        SUM ( 'Llo_DIR_Data'[Result] ),
        FILTER (
            'Llo_DIR_Data',
            [Date] <= EARLIER ( Llo_DIR_Data[Date] )
                && [New Month] = EARLIER ( Llo_DIR_Data[New Month] )
        )
    )
VAR _apps =
    CALCULATE (
        SUM ( 'Llo_DIR_Data'[Apps in Month/Term] ),
        FILTER (
            'Llo_DIR_Data',
            [Date] <= EARLIER ( Llo_DIR_Data[Date] )
                && [New Month] = EARLIER ( Llo_DIR_Data[New Month] )
        )
    )
RETURN
    DIVIDE ( _res, _apps )

7.png

 

I filtered out the blanks in the Power Query editor beforehand.

9.png

 

 

Best Regards,

Stephen Tao

 

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
lbendlin
Super User
Super User

You mention that you want a measure but your sample PBIX has a calculated column.  Please clarify.

 

The source data is a bit confusing. Can you maybe show the expected result for row 8 ?

Anonymous
Not applicable

Apologies i want to keep the calculated column measure....result for row 8 is 64.73

Anonymous
Not applicable

Hi @Anonymous ,

 

The result for row 8 should be 64.15%.

(81,788,374+94,393,580+98,235,790)/(135,605,381+137,602,264+154,585,590)=0.6415

Column =
VAR _res =
    CALCULATE (
        SUM ( 'Llo_DIR_Data'[Result] ),
        FILTER (
            'Llo_DIR_Data',
            [Date] <= EARLIER ( Llo_DIR_Data[Date] )
                && [New Month] = EARLIER ( Llo_DIR_Data[New Month] )
        )
    )
VAR _apps =
    CALCULATE (
        SUM ( 'Llo_DIR_Data'[Apps in Month/Term] ),
        FILTER (
            'Llo_DIR_Data',
            [Date] <= EARLIER ( Llo_DIR_Data[Date] )
                && [New Month] = EARLIER ( Llo_DIR_Data[New Month] )
        )
    )
RETURN
    DIVIDE ( _res, _apps )

7.png

 

I filtered out the blanks in the Power Query editor beforehand.

9.png

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors