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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

single value for column error

I'm trying to create a column to calculate the following formula:  Profit = ([GPRICE]+CurrentRebates[RebateAmt])-([cost]+[WhsChg]+[FRTCOST]). I am getting an error that: "A single value for column 'RebateAmt' in table 'CurrentRebates' 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."  Why is it trying to come up with a single value for the column?  I'm not aggregating the data, I want it to run the formula for each line in my table.  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I thought that I was using a calculated column.  Anyway, I kept working with it and by using the "Related" function (if that's the correct term), I was able to get the following to work.

 

Profit = [GPRICE]+RELATED(CurrentRebates[RebateAmt])-[cost]-[WhsChg]-[FRTCOST]

View solution in original post

4 REPLIES 4
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Anonymous,

 

When we create a measure, it is unable to call a table column directly. You need to do aggregation on it. And this is by design.

 

To resolve your issue, you can try calculated column with your expression.

 

Thanks,

Xi Jin.

MFelix
Super User
Super User

Hi @Anonymous,

 

This is happening because you are creating a measure and not a calculated column, since you are refering to CurrentRebates[RebatAmt] it returns this error because a measure need an agregattor on column level.

 

Check if you are adding a measure or a column.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

I thought that I was using a calculated column.  Anyway, I kept working with it and by using the "Related" function (if that's the correct term), I was able to get the following to work.

 

Profit = [GPRICE]+RELATED(CurrentRebates[RebateAmt])-[cost]-[WhsChg]-[FRTCOST]

Hi @Anonymous,

 

I'm glad to hear that you have resolved your issue. Please kindly mark your solution as answer. It will help others with relevant issues find the answer more easily. Smiley Happy

 

Thanks,
Xi Jin.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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