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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jonbox
Helper II
Helper II

Cumulative result per month

Hi, i'm trying to create a measure that accumulates the result per month so that when shown in the line graph, taking the total as an example to be 2.0m in may, 11m june, 11.8m in july, 12.3 in august etc as apposed to how it looks currently.

 

Current line graph:

jonbox_0-1647351642421.png

 

Data i'm using:

Actualprediction_USDDate
2.0mApril
9.0mMay
0.8mJune
0.5mJuly
0.8mAugust
0.8mSeptember
0.7October

 

My current measure:

 

total = 
CALCULATE( 
    SUM( eforecastingdata[ActualPrediction_USD]),
    FILTER(
        ALL(eforecastingdata),
        'eforecastingdata'[Date] <= MAX('eforecastingdata'[Date])
    ))

 

 

5 REPLIES 5
Anonymous
Not applicable

Hi @jonbox ,

Does that make sense? If so, kindly mark my answer as the solution close the case and help others find the answer  please. Thanks in advance.

 

Best Regards

Community Support Team _ Polly

 

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

Anonymous
Not applicable

Hi @jonbox ,

Please refer to my pbix file to see if it helps you.

Create a column firstly.

Short Month =
SWITCH (
    'Table (2)'[Date],
    "January", 1,
    "Febuary", 2,
    "March", 3,
    "April", 4,
    "May", 5,
    "June", 6,
    "July", 7,
    "August", 8,
    "September", 9,
    "October", 10,
    "November", 11,
    "December", 12,
    BLANK ()
)

Then Create a measure.

Measure = CALCULATE(SUM('Table (2)'[Actualprediction_USD]),FILTER(ALL('Table (2)'),'Table (2)'[Short Month]<=MAX('Table (2)'[Short Month])))

vpollymsft_0-1647587894933.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

 

Best Regards

Community Support Team _ Polly

 

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

 

amitchandak
Super User
Super User

@jonbox , You can consider suggestion of @truptis . But as you have a date, Create a date table; Join with date of your table and use month year on-axis from date table

 

Try measure like

 

total =
CALCULATE(
SUM( eforecastingdata[ActualPrediction_USD]),
FILTER(
ALL('Date'),
'Date'[Date] <= MAX('Date'[Date])
))

 


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak,

 

When you say create a table to organise date and join to existing table, how would i go about doing this?

truptis
Community Champion
Community Champion

Hi @jonbox ,

Create a rank (ID_MONTH) column for sorting it properly by month wise. Then use the below measure:

Quantity_CUMULATIVE =
CALCULATE (
[ActualPrediction_USD,
FILTER (
ALL ( Tablename[ID_MONTH] ),
Tablename[ID_MONTH]
<= MAX ( Tablename[ID_MONTH] ) - 1
)

)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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