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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
neorobert
Frequent Visitor

HELP needed with an advanced? custom formula

I’m trying to write a formula for the below measure, which pulls from a custom column and a measure. Maybe the formula needs to be written differently? That’s what the syntax is in the Excel workbook currently being used for this report.

 

Measure (the output would be a number):

RC Won = if('Data'[Final Reporting Status]="3-Won",'Data'[Won Reg],"")

Error: A single value for column 'Final Reporting Status' in table 'Data' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

                If I check all the values in the custom column, there are no blank rows or values other than the ones written in the below formula.

 

Referenced Custom Column for “Final Report Status” formula (no errors):

Final Reporting Status =

IF('Data'[Reporting Status]="Client Withdrew","5-CW",IF('Data'[Reporting Status]="Withdrew","6-AW",IF('Data'[Reporting Status]="Won","3-Won",IF('Data'[Reporting Status]="Lost","4-Lost",IF(AND('Data'[Reporting Status]="Pipeline",'Data'[Stage]="3B"),"2-Pipe",IF('Data'[Stage]="3B","3-Won",IF('Data'[Stage]="0A","1-Unqual",IF('Data'[Stage]="2B","2-Pipe",IF('Data'[Stage]="1","1-Unqual",IF('Data'[Stage]="2A","2-Pipe"))))))))))

 

 

“Won Reg” Measure (no errors):

                Won Reg = 'Data'[Total Net Revenue] * 'Data'[REG %]

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

When writing a measure, you need to use an aggregation when referring to a column, like:

 

RC Won = if(MAX('Data'[Final Reporting Status])="3-Won",MAX('Data'[Won Reg]),"")



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...

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Try this:
[RC Won]= CALCULATE([Won Reg], ‘Data’[Final Reporting Status] = “3-Won”)
Greg_Deckler
Community Champion
Community Champion

When writing a measure, you need to use an aggregation when referring to a column, like:

 

RC Won = if(MAX('Data'[Final Reporting Status])="3-Won",MAX('Data'[Won Reg]),"")



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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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