cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ftorres
Helper I
Helper I

Cummulative with measure not working

I'm trying to create a cummulative calcule but it's not working.

I've created 1 measure with Earned Value which is Earned Value = ([Planned Value BAC] * [Total of % Complete]) / 100

and then I created the

EV cummulative = CALCULATE([Earned Value], FILTER(ALLSELECTED(Budget),Budget[account_period] <= MAX(Budget[account_period])))

the result is diplayed below and the total is right, but it doesn't follow the sum. I've created also BAC cummulative and Actual cost cummulative and both works.

report.png

 

1 ACCEPTED SOLUTION
ftorres
Helper I
Helper I

I have to create a column Earned Value instead of a measure.

then the code below worked.

EV cummulative = CALCULATE([Earned Value], FILTER(ALLSELECTED(Budget),Budget[account_period] <= MAX(Budget[account_period])))

View solution in original post

4 REPLIES 4
ftorres
Helper I
Helper I

I have to create a column Earned Value instead of a measure.

then the code below worked.

EV cummulative = CALCULATE([Earned Value], FILTER(ALLSELECTED(Budget),Budget[account_period] <= MAX(Budget[account_period])))

Greg_Deckler
Super User
Super User

Tough to understand what is going on given the information provided. I take it that [Planned Value BAC] and [Total % Complete] are also measures? What are their formulas? What is the value of [Total % Complete] in the rows show below? What are your formulas for the cummulative totals that work?

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

Both are measures with SUM function.

Planned Value BAC = IF(SUM(Budget[budget_rev])<>0, SUM(Budget[budget_rev]), BLANK())

Total of % Complete = SUM(Budget[% Complete])

 

This measure below works

BAC cummulative = CALCULATE([Planned Value BAC],FILTER(ALLSELECTED(Budget),Budget[account_period] <= MAX(Budget[account_period])))

Hi @ftorres,

 

You formula seems well, can you please share a pbix file with some sample data for test?

 

In addition, you can also try to use following measure to calculate cumulative based on other measure:

Commulative =
VAR currPeriod =
    MAX ( Budget[account_period] )
VAR summary =
    ADDCOLUMNS ( ALLSELECTED ( Budget ), "EV", [Earned Value] )
RETURN
    SUMX ( FILTER ( summarize, Budget[account_period] <= currPeriod ), [EV] )

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors