cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
brinky Helper II
Helper II

dax error

I have created a simple measure:

 

Lasco Category = CALCULATE(
FIRSTNONBLANK(Category[LAS],1),FILTER(Category,Category[Code]='CodeuDesc'[Code]))
 
which works fine, however when I copy the same measure and remane I'm getting this error...
 
A single value for column 'Code' in table 'CodeuDesc' 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.
 
Any ideas why?
 
1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-gizhi-msft
Microsoft

Re: dax error

Hi,

 

Please try to create a calculated column instead of measure.

Hope this helps:

https://community.powerbi.com/t5/Desktop/Error-This-can-happen-when-a-measure-formula-refers-to-a-co... 

 

Best Regards,

Giotto Zhi

View solution in original post

3 REPLIES 3
Super User III
Super User III

Re: dax error

@brinky 

 

As the error message says you have to specify an aggreagtion

For example: Selectedvalue,max or min

 

Lasco Category =
CALCULATE (
    FIRSTNONBLANK ( Category[LAS], 1 ),
    FILTER ( Category, Category[Code] = SELECTEDVALUE ( 'CodeuDesc'[Code] ) )
)

 

 

Try my new Power BI game Cross the River
brinky Helper II
Helper II

Re: dax error

Thanks for your reply, but I'm not getting any results 😐

Microsoft v-gizhi-msft
Microsoft

Re: dax error

Hi,

 

Please try to create a calculated column instead of measure.

Hope this helps:

https://community.powerbi.com/t5/Desktop/Error-This-can-happen-when-a-measure-formula-refers-to-a-co... 

 

Best Regards,

Giotto Zhi

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors