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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Austinehype
Helper I
Helper I

Sum the remaining months

Hi,

I have the below table where I would like to have a measure that is sum the remaining month number.

The FY is starting at 2020.04 and end at 2021.03

The MTH left shows the remains number of month from the fiscal year.

 

For example we are now in December 202012(Monat) and I want a measure that sum the remaining mth number in this case this month and the remaining months (Mth left 3+2+1+0) = 6

January would be = 3

Capture.JPG

4 REPLIES 4
Austinehype
Helper I
Helper I

Capture.JPG

Austinehype
Helper I
Helper I

Hi @v-eqin-msft 

 

Thank your for your help, I tried the above measures and it seems like it's sum up every single rows.Capture.JPG

I have 81744 rows and the column mth left 12 distinct values

v-eqin-msft
Community Support
Community Support

Hi @Austinehype ,

You could use the following formula:

Measure =
CALCULATE (
    SUM ( 'Table'[Mth left] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Mth left] <= MAX ( 'Table'[Mth left] ) )
)
Column =
CALCULATE (
    SUM ( 'Table'[Mth left] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Date] >= EARLIER ( 'Table'[Date] ) )
)

Or you could add a Index column firstly and then use:

Measure 2 =
CALCULATE (
    SUM ( 'Table'[Mth left] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Index] >= MAX ( 'Table'[Index] ) )
)

My visualization looks like this:

12.14.3.1.PNG

Here is the pbix file.

 

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

 

Best Regards,
Eyelyn Qin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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