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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Filter Calculation - MUST BE NEW COLUMN

I have a set of data that I am going to want to filter by (ultimately going to put this calculation into an if statement to determine if it's overbudget and want to be able to slice by the red/yellow/green output).

 

The data looks like this, and I have created a formula (overbudget) that right now just sums everything by the project ID, however I want use it to say the following for each project ID:

 

If (Sum of Expenditure (type = target) >= sum of Expenditure (type = trend), "On Plan", "Overbudget")

 

 

Overbudget (CURRENTLY) = Calculate(Sum('PP - Project Status: Spend Chart'[Value]), ALLEXCEPT('PP - Project Status: Spend Chart', 'PP - Project Status: Spend Chart'[Project IDId]))

 

 

enswitzer_0-1607955243333.png

 

I seem to have no issues doing this as measures - but get stuck trying to do it as a new column. 

3 REPLIES 3
Anonymous
Not applicable

@Greg_Deckler 

Looking to create the Overbudget column just not as a measure. 

 

enswitzer_0-1607956816125.png

 

Current measure formulas:

 

Total Budget =
CALCULATE (
[Total Value],
'PP - Project Status: Spend Chart'[Expenditure Type] = "Target"
)
 
Total Trend Spend =
CALCULATE (
[Total Value],
'PP - Project Status: Spend Chart'[Expenditure Type] = "Actual"
)
+ CALCULATE (
[Total Value],
'PP - Project Status: Spend Chart'[Expenditure Type] = "Trend"
)
 
Overbudget Measure = if([Total Budget]>=[Total Trend Spend], "On Plan", "Over Budget")

 

 

I don'@enswitzer,

You can create a measure as follows:

Measure = 
var _totalbudget=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Project ID]=MAX('Table'[Project ID])&&'Table'[Expenditure Type]="Target"))
var _totaltrendspend=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Project ID]=MAX('Table'[Project ID])&&'Table'[Expenditure Type]="Trend"))
Return
IF(_totalbudget>=_totaltrendspend,"On Plan", "Overbudget")

And you'll see:

v-kelly-msft_0-1609404493413.png

For the related .pbix file, see attachment pls.

Saludos
Kelly

Have I answered your question? Mark my position as a solution!

Greg_Deckler
Community Champion
Community Champion

@Anonymous So given the data above, what would this new column be for each row?



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors