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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
brinky
Helper IV
Helper IV

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
v-gizhi-msft
Community Support
Community Support

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
v-gizhi-msft
Community Support
Community Support

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

Zubair_Muhammad
Community Champion
Community Champion

@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] ) )
)

 

 


Regards
Zubair

Please try my custom visuals

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.