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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Snagalapur
Helper IV
Helper IV

Cumulative phasing

Hi All,

 

Kindly suggest how to modify below measure to show cumulative values ie.. P01 = P01, P02 = P01 +P02, P03 = P01 +P02+P03

 

Budget PNL =

VAR LC=

CALCULATE(SUM(FACT_DATA[AMOUNT]), FILTER(FACT_DATA, [CURRENCY_ID]=186 && FACT_DATA [SCENARIO_ID]=2 && year(FACT_DATA [PERIOD_DATE])=[ControlPeriod Current Year]))

 

VAR USD=

CALCULATE(SUM(FACT_DATA[AMOUNT]), FILTER(FACT_DATA, [CURRENCY_ID]=184 && FACT_DATA [SCENARIO_ID]=2&& year(FACT_DATA[PERIOD_DATE])=[ControlPeriod Current Year]))

 

RETURN

IF(SELECTEDVALUE(_Currency[Currency])="Local",LC,

IF(SELECTEDVALUE(_Currency[Currency])="USD Operational",USD))

 

ControlPeriod Current Year = YEAR(ALL(DIM_CONTROL_PERIOD[CURRENT_PERIOD]))

 

my model looks like: 

Snagalapur_0-1771341526540.png

Snagalapur_7-1771342253790.png

 

Snagalapur_4-1771341716244.png

Snagalapur_5-1771342008455.png

 

 

 

Snagalapur_3-1771341625847.png

Snagalapur_6-1771342179113.png

 

 

 

1 ACCEPTED SOLUTION

no problem. I did try below code block to modyfy my formulas and this works 

Cumulative Sales = 
VAR MaxDate = MAX('DateTable'[Date])
RETURN
CALCULATE(
    SUM('Sales'[Amount]),
    FILTER(
        ALLSELECTED('DateTable'),
        'DateTable'[Date] <= MaxDate
    )
)

Snagalapur_0-1771412664663.png

 

 

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Is there a month/year associated with the period that you have shown in the column area of the matrix?  Share some data to work with and explain the calculations logic in simple language.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thnak you for taking time, I did modify content to provide more details.

sorry but still cannot understand.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

no problem. I did try below code block to modyfy my formulas and this works 

Cumulative Sales = 
VAR MaxDate = MAX('DateTable'[Date])
RETURN
CALCULATE(
    SUM('Sales'[Amount]),
    FILTER(
        ALLSELECTED('DateTable'),
        'DateTable'[Date] <= MaxDate
    )
)

Snagalapur_0-1771412664663.png

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.